Search Unity

Can't replicate TwoStickHybrid sample's Settings GO. Is there a simpler way to do the same?

Discussion in 'Entity Component System' started by JaqMam, Jul 19, 2018.

  1. JaqMam

    JaqMam

    Joined:
    Jul 19, 2018
    Posts:
    1
    Hi,

    In the TwoStickHybrid example, there's a Settings game object present in the scene. It contains a monobehaviour which has many generic variables used by ComponentSystems work set up through the inspector.
    The way it's done is a bit complicated for me. Another file, TwoStickBootstrap is use to link them. I tried to do the same in my project but can't (I get Objet reference not set to an instance of an object when I try to refer to a variable use by the Settings script, which I guess means it's trying to reach a variable by the base script rather than the one set up through the inspector).

    I was wondering: is there a simpler way to do it? Rather than through an auxiliary bootstrap file, just call the variables set in that gameobject.

    Thanks.