コード例 #1
0
        // --------------------------------------------------------------------

        private void CreateEntity()
        {
            NewEntityWindow window = new NewEntityWindow();

            if (window.ShowDialog() == DialogResult.OK)
            {
                SceneObject root = ParseNode(mCurrentModel.RootNode, false);
                EditorEntityUtils.Create(root, window.EntityName);
            }
        }
コード例 #2
0
        // --------------------------------------------------------------------

        private void CreateEntity()
        {
            NewEntityWindow window = new NewEntityWindow();
            if (window.ShowDialog() == DialogResult.OK)
            {
                SceneObject root = ParseNode(mCurrentModel.RootNode, false, null);
                OnyxProjectAsset entity = ProjectManager.Instance.Content.GetEntityByName(window.EntityName);
                if (entity == null)
                    EditorEntityUtils.Create(root, window.EntityName);
                else
                    AssetLoader<Entity>.Save(new Entity(root), entity.Path);
            }
		}