Skip to content

Commit 7d1690e

Browse files
Minor execution order improvements
1 parent 2285d45 commit 7d1690e

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

Runtime/EntityComponent.cs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -78,11 +78,12 @@ public Vector3 localScale {
7878
/// <returns>The system.</returns>
7979
/// <exception cref="System.Exception"></exception>
8080
EntitySystemType GetSystem () {
81+
if (system != null) {
82+
return system;
83+
}
8184
if (Controller.Instance == null) {
8285
throw new System.Exception ("Tried to access the Controller while non is instantiated");
8386
}
84-
if (system != null)
85-
return system;
8687
if (Controller.Instance.HasSystem<EntitySystemType> ()) {
8788
system = Controller.Instance.GetSystem<EntitySystemType> ();
8889
return system;

0 commit comments

Comments
 (0)