Beispiel #1
0
    public void CreateMeshBakerSettingsAsset()
    {
        string newFilePath = UnityEditor.EditorUtility.SaveFilePanelInProject("New Mesh Baker Settings", "MeshBakerSettings", "asset", "Create a new Mesh Baker Settings Asset");

        if (newFilePath != null)
        {
            MB3_MeshCombinerSettings asset = ScriptableObject.CreateInstance <MB3_MeshCombinerSettings>();
            UnityEditor.AssetDatabase.CreateAsset(asset, newFilePath);
        }
    }
    public override void OnInspectorGUI()
    {
        MB3_MeshCombinerSettings tbg = (MB3_MeshCombinerSettings)target;

        settingsSerializedObj.Update();
        EditorGUILayout.HelpBox("This asset can be shared by many Mesh Bakers and MultiMeshBakers. Drag this " +
                                " asset to the 'Use Shared Settings' field of any Mesh Baker", MessageType.Info);
        meshBakerSettingsEditor.DrawGUI(tbg.data, true);
        settingsSerializedObj.ApplyModifiedProperties();
    }