internal static void Start() { var t = Resources.Load <TextAsset>("SettingsFramework"); if (t != null) { JsonUtility.FromJsonOverwrite(t.text, Framework.Settings); } Framework.Settings.SizeGenerations = Framework.Settings.SizeComponents / 32; lengthTotal = Framework.Settings.SizeEntities; Generations = new int[Framework.Settings.SizeEntities, Framework.Settings.SizeGenerations]; GenerationsInstant = new int[Framework.Settings.SizeEntities, Framework.Settings.SizeGenerations]; Transforms = new Transform[Framework.Settings.SizeEntities]; entities = (CacheEntity *)UnmanagedMemory.Alloc(sizeEntityCache * Framework.Settings.SizeEntities); #if !ACTORS_TAGS_0 Tags = (CacheTags *)UnmanagedMemory.Alloc(sizeBufferTags * Framework.Settings.SizeEntities); #endif for (int i = 0; i < Framework.Settings.SizeEntities; i++) { #if !ACTORS_TAGS_0 Tags[i] = new CacheTags(); #endif entities[i] = new CacheEntity(6); } alive = new ents(Framework.Settings.SizeEntities); #if UNITY_EDITOR Toolbox.OnDestroyAction += Dispose; #endif }
public void Initialize() { childs = new ents(); signature = new int[LayerKernel.Settings.SizeGenerations]; }