Esempio n. 1
0
        private void DrawAssetPaths()
        {
            HullPainter currentHullPainter = sceneManipulator.GetCurrentHullPainter();

            GUILayout.Space(20);

            //	GUILayout.BeginHorizontal ();
            {
                string path = AssetDatabase.GetAssetPath(currentHullPainter.paintingData);
                GUILayout.Label("Painting data: " + path, EditorStyles.centeredGreyMiniLabel);
            }
            //	GUILayout.EndHorizontal();

            //	GUILayout.BeginHorizontal ();
            {
                string path = AssetDatabase.GetAssetPath(currentHullPainter.hullData);
                GUILayout.Label("Hull data: " + path, EditorStyles.centeredGreyMiniLabel);
            }
            //	GUILayout.EndHorizontal();

            if (GUILayout.Button("Disconnect from assets"))
            {
                sceneManipulator.DisconnectAssets();

                currentHullPainter = null;
                repaintSceneView   = true;
                regenerateOverlay  = true;
            }
        }
Esempio n. 2
0
        private void DrawAssetGui()
        {
            areAssetsFoldedOut = EditorGUILayout.Foldout(areAssetsFoldedOut, new GUIContent("Assets", assetsIcon), foldoutStyle);
            if (areAssetsFoldedOut)
            {
                HullPainter currentHullPainter = sceneManipulator.GetCurrentHullPainter();

                string paintingPath = AssetDatabase.GetAssetPath(currentHullPainter.paintingData);
                GUILayout.Label("Painting data: " + paintingPath, EditorStyles.centeredGreyMiniLabel);

                string hullPath = AssetDatabase.GetAssetPath(currentHullPainter.hullData);
                GUILayout.Label("Hull data: " + hullPath, EditorStyles.centeredGreyMiniLabel);

                if (GUILayout.Button("Disconnect from assets"))
                {
                    sceneManipulator.DisconnectAssets();

                    currentHullPainter = null;
                    repaintSceneView   = true;
                    regenerateOverlay  = true;
                }
            }
        }