Last active
July 23, 2019 14:59
-
-
Save Densyakun/34324fd89d0500d33d00659c7fcfede7 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using Unity.Entities; | |
using Unity.Rendering; | |
using Unity.Transforms; | |
public class Main : MonoBehaviour | |
{ | |
private World _world; | |
void OnEnable() | |
{ | |
_world = World.Active = new World("MyWorld"); | |
_world.CreateManager<EntityManager>(); | |
ScriptBehaviourUpdateOrder.UpdatePlayerLoop(_world); | |
} | |
void OnDisable() | |
{ | |
ScriptBehaviourUpdateOrder.UpdatePlayerLoop(null); | |
_world.Dispose(); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment