Search Unity

  1. Unity 6 Preview is now available. To find out what's new, have a look at our Unity 6 Preview blog post.
    Dismiss Notice
  2. Unity is excited to announce that we will be collaborating with TheXPlace for a summer game jam from June 13 - June 19. Learn more.
    Dismiss Notice

Question Consistent behaviour for multiple instances of same component anywhere in the project

Discussion in 'Editor & General Support' started by slowDrag0n, Jun 18, 2020.

  1. slowDrag0n

    slowDrag0n

    Joined:
    Oct 10, 2017
    Posts:
    41
    Hi
    I was wondering if there is currently a way to do this. Given any component in my project, wether it be my own scirpt or build-in components, i'd like to have a preset for these components so that no matter where i use that component on a gameobject, it will pickup what settings i want to have for that component in my project. This way i can have a consistent settings for different components throughout my project.
     
  2. PraetorBlue

    PraetorBlue

    Joined:
    Dec 13, 2012
    Posts:
    7,933
    This is built in to Unity, at least for monobehaviours. If you select a script in the project window, you can set default values for it in the inspector.
     
  3. slowDrag0n

    slowDrag0n

    Joined:
    Oct 10, 2017
    Posts:
    41
    that is helpful yes but i was thinking more along the lines of whole project wise. For example say i have a scrollRect in my scene that i have tweaked a bit. Now currently i can make a preset of it. But the problem is the preset will take all the vales for its scrollbar, viewport etc also. so if i apply that preset to other scroll rect in the scene, the second scrollrect would start referencing the viewport, scrollbar, etc of the first scrollrect that i made the preset from. maybe an option to ignore what to include in a preset might help.
     
  4. PraetorBlue

    PraetorBlue

    Joined:
    Dec 13, 2012
    Posts:
    7,933