Esempio n. 1
0
        private List <LevelEditorResource> EmptyTree()
        {
            List <LevelEditorResource> treeElements = new List <LevelEditorResource>();
            LevelEditorResource        root         = new LevelEditorResource()
            {
                Name = "Root", ID = "ale_tree_view_root", TreeDepth = -1, TreeID = 0
            };

            treeElements.Add(root);

            return(treeElements);
        }
Esempio n. 2
0
        private void CreateResources()
        {
            resources = ScriptableObject.CreateInstance <LevelEditorResourceList>();

            cube     = GameObject.CreatePrimitive(PrimitiveType.Cube);
            sphere   = GameObject.CreatePrimitive(PrimitiveType.Sphere);
            capsule  = GameObject.CreatePrimitive(PrimitiveType.Capsule);
            cylinder = GameObject.CreatePrimitive(PrimitiveType.Cylinder);

            sceneObjects.Add(cube);
            sceneObjects.Add(sphere);
            sceneObjects.Add(capsule);
            sceneObjects.Add(cylinder);

            LevelEditorResource cubeResource = new LevelEditorResource
            {
                Name  = "Cube",
                Asset = cube,
                ID    = "cube"
            };

            LevelEditorResource sphereResource = new LevelEditorResource
            {
                Name  = "Sphere",
                Asset = sphere,
                ID    = "sphere"
            };

            LevelEditorResource capsuleResource = new LevelEditorResource
            {
                Name  = "Capsule",
                Asset = capsule,
                ID    = "capsule"
            };

            LevelEditorResource cylinderResource = new LevelEditorResource
            {
                Name  = "Cylinder",
                Asset = cylinder,
                ID    = "cylinder"
            };

            resources.AddResource(cubeResource);
            resources.AddResource(sphereResource);
            resources.AddResource(capsuleResource);
            resources.AddResource(cylinderResource);
        }