Search Unity

Values from editor

Discussion in 'Entity Component System' started by ChrisTsu, Jul 31, 2019.

  1. ChrisTsu

    ChrisTsu

    Joined:
    Jan 13, 2019
    Posts:
    11
    I'm new to unity and new to programming, so sorry for anything stupid i say in advance.

    Now, what is the best way to get some values that i can change in the editor and then,when the game starts or when i change the values in the editor, do something to some entities with those values.

    access the fields of a script of a gameobject from a system maybe?
    convert that gameobject then somehow get the values from the components?

    if my question is not clear i'll try to clarify.
     
  2. RoughSpaghetti3211

    RoughSpaghetti3211

    Joined:
    Aug 11, 2015
    Posts:
    1,705
    I would start by reading the Documentation and then digging into the Samples.

    Maybe start by just creating some Entities. I can later reply with some example I found useful when I started with ECS
     
  3. ChrisTsu

    ChrisTsu

    Joined:
    Jan 13, 2019
    Posts:
    11
    i'm constantly looking at the documentation and going through the samples.I have made a scene with subscene and i now try (without pressing play) to change some values on an inspector script, and when i do, some entities will change their scale

    edit: i just discovered Unity.Entities.Editor , maybe this is the right direction? trying to figure out how this works
     
    Last edited: Aug 1, 2019
  4. Joachim_Ante

    Joachim_Ante

    Unity Technologies

    Joined:
    Mar 16, 2005
    Posts:
    5,203
    If you are both new to programming and Unity. I'll recommend using MonoBehaviour & game objects without DOTS for the time being.
     
    Antypodish likes this.
  5. Antypodish

    Antypodish

    Joined:
    Apr 29, 2014
    Posts:
    10,770
    Agree. There is much more resources available to Monobrhaviour type programming. Also Unity is more friendly as well for beginners. Where DOTS is rather in its infant state. Often breaking things.