void Start()
    {
        _brushController     = GameObject.Find("Brush").GetComponent <BrushController> ();
        _segments            = new Dictionary <IntVector3, GameObject> (new IntVector3.EqualityComparer());
        _marchingCubesEngine = GameObject.Find("MarchingCubesEngine").GetComponent <MarchingCubesEngine> ();
        Debug.Assert(_marchingCubesEngine != null);
        _colorPicker         = GameObject.Find("ColorPicker").GetComponent <ColorPicker> ();
        _runtimeTranslation  = GameObject.Find("RuntimeTranslation").GetComponent <RuntimeTranslation> ();
        _editorState         = GameObject.Find("UICanvas").GetComponent <EditorState> ();
        _materialsController = GameObject.Find("MaterialsCanvas").GetComponent <MaterialsController> ();
        Debug.Assert(_materialsController != null);

        int width = 2 * EDITOR_SPACE_HALF_WIDTH + 1;

        _editSpace = new int[width, width, width];

        if (use_lerp_color)
        {
            GenNearestVoxelPointForEdgePointTable();
        }
        else
        {
            GenNearestVoxelPointTable();
        }

        _meshRenderer = GetComponent <MeshRenderer> ();
    }
Beispiel #2
0
    private void Awake()
    {
        brushController  = GetComponent <BrushController>();
        buttonController = GetComponent <ButtonController>();

        DontDestroyOnLoad(gameObject);
    }
    void Start()
    {
        _textEmit      = GameObject.Find("TextEmit").GetComponent <Text> ();
        _textEmit.text = emission_per_second.ToString();

        _polyWorldController = GameObject.Find("PolyWorldSpace").GetComponent <PolyWorldController> ();
        _brushController     = GameObject.Find("Brush").GetComponent <BrushController> ();
    }