private void CreateEntityGroup()
        {
            var module      = m_MainModule.Dereference(m_Registry);
            var entityGroup = m_Registry.CreateEntityGroup(UTinyId.New(), UTinyUtility.GetUniqueName(module.EntityGroups, "NewEntityGroup"));

            module.AddEntityGroupReference((UTinyEntityGroup.Reference)entityGroup);
            m_TreeView.Reload();
            m_TreeView.SetSelection(new List <int> {
                m_TreeView.State.GetInstanceId(entityGroup.Id)
            }, TreeViewSelectionOptions.RevealAndFrame);
        }
예제 #2
0
        public static UTinyEntityGroup Generate(IRegistry registry, UTinyProject project)
        {
            var entityGroup = registry.CreateEntityGroup(UTinyId.New(), "Assets_Generated");
            var assets      = AssetIterator.EnumerateAssets(project.Module.Dereference(project.Registry));

            foreach (var asset in assets)
            {
                CreateEntityForAsset(registry, project, entityGroup, asset);
            }

            return(entityGroup);
        }
예제 #3
0
        private static void AcceptScene(IDictionary <string, object> dictionary, IRegistry registry)
        {
            var entityGroupId   = ParseId(GetValue(dictionary, "Id"));
            var entityGroupName = GetValue <string>(dictionary, "Name");

            var entityGroup = registry.CreateEntityGroup(entityGroupId, entityGroupName);

            ParseRegistryObjectBase(entityGroup, dictionary);

            IList <object> entitiesList;

            if (TryGetValue(dictionary, "Entities", out entitiesList))
            {
                foreach (var obj in entitiesList)
                {
                    entityGroup.AddEntityReference(ParseEntityReference(obj));
                }
            }
        }