Search Unity

Component Custom Name

Discussion in 'Scripting' started by CorWilson, Jul 2, 2022.

  1. CorWilson

    CorWilson

    Joined:
    Oct 3, 2012
    Posts:
    95
    Is there a way to have it where you can add additional information to a component name? For instance, I have a lot of these collapsed and they all say "Simple Animation (Script)" but they all have unique Anim Tag names. But I would love to basically have the Anim Tag variable be added to this title so I can distinguish the scripts better in their collapsed form.

    upload_2022-7-2_9-41-36.png
     
  2. Sphinks

    Sphinks

    Joined:
    Apr 6, 2019
    Posts:
    267
    I don´t think you can change file names during runtime, so you have to do that manually.
     
  3. spiney199

    spiney199

    Joined:
    Feb 11, 2021
    Posts:
    7,929
    Basically the is "yes" but it requires plenty of custom editor work.

    There was another thread about this where someone generous provided a solution. A bit of using the forum search should probably net you the right thread.
     
  4. CorWilson

    CorWilson

    Joined:
    Oct 3, 2012
    Posts:
    95
    I searched again and you're right, someone had a solution, abeit had to drop $10 for it. But it was worth it.

    https://forum.unity.com/threads/can-i-change-a-components-inspector-title-bar-text.959682/

    Got exactly what I needed.

    upload_2022-7-5_19-20-13.png
     
    karliss_coldwild likes this.