Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. Dismiss Notice

Can no longer rename subassets since 5.3.4f1

Discussion in 'Editor & General Support' started by EendhoornGames, Apr 13, 2016.

  1. EendhoornGames

    EendhoornGames

    Joined:
    Sep 5, 2015
    Posts:
    5
    I used to rename my subassets with an editor script;

    Code (CSharp):
    1.  public override void OnInspectorGUI()
    2.         {
    3.             base.OnInspectorGUI();
    4.  
    5.             CharacterData targetObj = (CharacterData)target;
    6.  
    7.             if ( GUILayout.Button( "rename" ) )
    8.             {
    9.                 targetObj.name = targetObj.characterName;
    10.                 EditorUtility.SetDirty( targetObj );
    11.                 AssetDatabase.SaveAssets();
    12.                 AssetDatabase.Refresh();
    13.             }
    14.         }
    This doesn't do anything anymore unfortunately.
    I cannot use AssetDatabase.RenameAsset, because there are a bunch of subassets that share the same name, and therefore have identical paths.

    I wish I could rename the asset in the unity editor itself, but it seems that isn't possible either :(
     
  2. EendhoornGames

    EendhoornGames

    Joined:
    Sep 5, 2015
    Posts:
    5
    Anyone? My project is starting to become an unorganized mess :(
     
  3. zombiegorilla

    zombiegorilla

    Moderator

    Joined:
    May 8, 2012
    Posts:
    8,950
    What kind of asset? You can rename assets directly in the project window. Can you provide more info on what you are trying to do?
     
  4. mpulkkinen

    mpulkkinen

    Joined:
    Apr 8, 2013
    Posts:
    15
    Same thing here, propably relates to this error: https://issuetracker.unity3d.com/is...hild-scriptable-objects-changes-spontaneously

    And yes, our project too starts to be a huge mess also because of this. We have literally tons of scriptable objects in hundreds of collection as sub-assets, so maintaining that data amount is painfull because sub asset names go wrong! Unity, could you please fix the issue ASAP!!!