Example #1
0
    public void Start()
	{
		stlHolder = GameObject.Find ("stlHolder").transform;
        var tbSpace = 20;
        GetComponent<InspectorL>().MainRect = new Rect(5, tbSpace, 250, 570);
        windowStyle.fontSize = 50;
        MM = GameObject.Find("MESH").GetComponent<MakeMesh>();
        MM.material = Mat;
        MM.Begin();
    }
Example #2
0
    void Start ()
    {
        stlInterpreter = new StlInterpreter();
        mainMenu = GameObject.Find("Main Menu");
        folderWindow = GameObject.Find("Folder Window");
        sceneWindow = GameObject.Find("Scene Window");

        folderWindow.GetComponent<PanelFades>().FadeOut();
        sceneWindow.GetComponent<PanelFades>().FadeOut();
        _cursor = Instantiate(cursor) as GameObject;
        _cursor.transform.SetParent(mainMenu.transform);
        var pos = Camera.main.ScreenToWorldPoint(new Vector3(Input.mousePosition.x, Input.mousePosition.y + mouseYoffset, -1f));
        var rot = new Quaternion(0, 0, 0, 0);
        _cursor.transform.localPosition = pos;
        _cursor.transform.localRotation = rot;
        MM = GameObject.Find("MESH").GetComponent<MakeMesh>();
        MM.material = Mat;
        MM.Begin();

        for (int i = 0; i < landscapes.Count; i++)
        {
            var l = Instantiate(landscapes[i]);
            l.name = landscapes[i].name;
            l.active = false;
            landscapes[i] = l;
        }

        for (int i = 0; i < props.Count; i++)
        {
            var p = Instantiate(props[i]);
            p.name = props[i].name;
            p.active = false;
            props[i] = p;
        }

        var options = new List<Dropdown.OptionData>(skyboxes.Count);
        foreach (var skybox in skyboxes)
        {
            var newOption = new Dropdown.OptionData(skybox.name);
            options.Add(newOption);
        }
        skyboxDD.options = options;

        options = new List<Dropdown.OptionData>(MM.materials.Count);
        foreach (var mat in MM.materials)
        {
            var newOption = new Dropdown.OptionData(mat.name);
            options.Add(newOption);
        }
        materialDD.options = options;

        options = new List<Dropdown.OptionData>(landscapes.Count);
        var none = new Dropdown.OptionData("None");
        options.Add(none);
        foreach (var landscape in landscapes)
        {
            var newOption = new Dropdown.OptionData(landscape.name);
            options.Add(newOption);
        }
        landscapeDD.options = options;

        options = new List<Dropdown.OptionData>(props.Count);
        options.Add(none);
        foreach (var prop in props)
        {
            var newOption = new Dropdown.OptionData(prop.name);
            options.Add(newOption);
        }
        propDD.options = options;
        currentProp = null;



        materialDD.onValueChanged.AddListener(delegate {
            MaterialDropdownValueChangedHandler(materialDD);
        });

        skyboxDD.onValueChanged.AddListener(delegate {
            SkyboxDropdownValueChangedHandler(skyboxDD);
        });

        landscapeDD.onValueChanged.AddListener(delegate {
            LandscapeDropdownValueChangedHandler(landscapeDD);
        });

        propDD.onValueChanged.AddListener(delegate {
            PropDropdownValueChangedHandler(propDD);
        });
    }
Example #3
0
 public void Start()
 {
     dmcHolder = GameObject.Find ("dmcHolder").transform;
     stlHolder = GameObject.Find ("stlHolder").transform;
     jobHolder = GameObject.Find ("jobHolder").transform;
     gcdHolder = GameObject.Find("gcdHolder").transform;
     var tbSpace = 20;
     var tbWidth = InspectorT.TopToolbarStrings.Length * 120;
     GetComponent<InspectorT>().MainRect = new Rect(2, 0, tbWidth, 80);
     GetComponent<InspectorR>().MainRect = new Rect(Screen.width - 255, tbSpace, 250, 570);
     GetComponent<InspectorL>().MainRect = new Rect(5, tbSpace, 250, 570);
     windowStyle.fontSize = 50;
     MM = GameObject.Find("MESH").GetComponent<MakeMesh>();
     MM.material = stlMat;
     MM.Begin();
 }