Esempio n. 1
0
        private void AssignValues()
        {
            brushScales = new int[]
            {
                1, 3, 5, 7, 9, 11, 13, 15
            };
            brushTiles = new string[brushScales.Length];
            for (int i = 0; i < brushScales.Length; i++)
            {
                brushTiles[i] = Mathf.RoundToInt(Mathf.Pow(brushScales[i], 2)).ToString();
            }

            enableDesigner = serializedObject.FindProperty("enableDesigner");
            tileScale      = serializedObject.FindProperty("tileScale");
            yOffset        = serializedObject.FindProperty("yOffset");
            brushIndex     = serializedObject.FindProperty("brushIndex");
            alignY         = serializedObject.FindProperty("alignY");
            tagsToIgnore   = serializedObject.FindProperty("tagsToIgnore");
            layersToIgnore = serializedObject.FindProperty("layersToIgnore");
            disableMeshRenderersAtStart = serializedObject.FindProperty("disableMeshRenderersAtStart");
            storage = serializedObject.FindProperty("storage");
            CreateSceneAssets();

            meshPainter = new MeshPainter();
            meshPainter.Enable(this);
        }