Search Unity

  1. Unity 2018.3 is now released.
    Dismiss Notice
  2. The Unity Pro & Visual Studio Professional Bundle gives you the tools you need to develop faster & collaborate more efficiently. Learn more.
    Dismiss Notice
  3. We've updated our Terms of Service. Please read our blog post from Unity CTO and Co-Founder Joachim Ante here
    Dismiss Notice
  4. Want to provide direct feedback to the Unity team? Join the Unity Advisory Panel.
    Dismiss Notice
  5. Improve your Unity skills with a certified instructor in a private, interactive classroom. Watch the overview now.
    Dismiss Notice

Suggestion: Prefab Variants for any Object (ScriptableObject Variants)

Discussion in 'Prefabs' started by BlaiseRoth, Nov 19, 2018.

  1. BlaiseRoth


    Oct 11, 2016
    In my game, I have a bunch of settings ScriptableObjects that I use to specify different values for an objects in my game. What I'd like to be able to do is make a new settings object, and only override certain settings, so the rest stay in sync with the original settings object. With prefab variants, this is now possible, but my settings objects need to have an accompanying GameObject, which is not ideal. It makes it clunky to load these settings objects, because I can no longer load them by type, and instead I need to store a reference to them somewhere.

    So what I'd really like is if Prefab Variants were generalised to work on any UnityEngine.Object, so I can make a variant of any asset I like. Mostly I'd use this for ScriptableObjects, but I'm sure there's bound to be other uses for this too.

    Thanks for reading.
    MylesLambert, Lecks and Jes28 like this.
  2. KazenoZ


    Jan 24, 2015

    Similar use case in my project:
    I made an AI system where I define a behavioural structure of a CP by a collection of traits (Actions they can choose to take), and a few general levers, such as simulated reaction time.


    I can define different AI difficulty levels or create different behaviours for different game modes by changing the reaction time or values used by each trait to decide whether to choose it at a certain time. But I need to create an asset for each difficulty setting that may very well only differ by a single value being changed (Such as the reaction time), and that means that every time I want to change the basic balance of the core AI, I need to make sure to do it on all difficulty levels separately.

    Would be awesome to have the ability to use variants here.