Created
September 22, 2018 17:51
-
-
Save tsubaki/3f1eea60dec9097928038b2ab4dfd74a 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 UnityEngine; | |
using Unity.Entities; | |
using Unity.Rendering; | |
using Unity.Transforms; | |
public class Boostrap : MonoBehaviour | |
{ | |
private World gameWorld, menuWorld; | |
void Awake() | |
{ | |
gameWorld = new World("Game World"); | |
menuWorld = new World("Menu World"); | |
gameWorld.CreateManager<MeshInstanceRendererSystem>(); | |
gameWorld.CreateManager<TransformSystem>(); | |
gameWorld.CreateManager<RenderingSystemBootstrap>(); | |
gameWorld.CreateManager<EndFrameTransformSystem>(); | |
// 中略 | |
} | |
void OnDestroy() | |
{ | |
gameWorld.Dispose(); | |
menuWorld.Dispose(); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment