Skip to content

Commit

Permalink
Minor execution order improvements
Browse files Browse the repository at this point in the history
  • Loading branch information
jeffreylanters committed Mar 27, 2023
1 parent 2285d45 commit 7d1690e
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions Runtime/EntityComponent.cs
Original file line number Diff line number Diff line change
Expand Up @@ -78,11 +78,12 @@ public Vector3 localScale {
/// <returns>The system.</returns>
/// <exception cref="System.Exception"></exception>
EntitySystemType GetSystem () {
if (system != null) {
return system;
}
if (Controller.Instance == null) {
throw new System.Exception ("Tried to access the Controller while non is instantiated");
}
if (system != null)
return system;
if (Controller.Instance.HasSystem<EntitySystemType> ()) {
system = Controller.Instance.GetSystem<EntitySystemType> ();
return system;
Expand Down

0 comments on commit 7d1690e

Please sign in to comment.