UpdatePathInResources() public méthode

public UpdatePathInResources ( ) : void
Résultat void
Exemple #1
0
    bool DrawMovedSample( GATSampleInfo info )
    {
        bool remove = false;

        GUILayout.Label( string.Format( "Sample {0}'s path has changed.", info.Name ) );

        GUILayout.BeginHorizontal();
        if( GUILayout.Button( "Select", __smallerButtons ) )
        {
            Selection.activeObject = AssetDatabase.LoadAssetAtPath( AssetDatabase.GUIDToAssetPath( info.GUID ), typeof( AudioClip ) );
        }

        GUI.backgroundColor = Color.green;
        if( GUILayout.Button( "Update", __smallerButtons ) )
        {
            info.UpdatePathInResources();
            EditorUtility.SetDirty( _soundBank );
        }

        GUI.backgroundColor = Color.red;
        if( GUILayout.Button( "Remove", __smallerButtons ) )
        {
            _soundBank.RemoveSample( info );
            EditorUtility.SetDirty( _soundBank );
            remove = true;
        }

        GUILayout.EndHorizontal();

        return !remove;
    }