Serialized Coroutine hide itself when is [ReadOnly] and not null

Issue #775 resolved
Joao Gabriel created an issue
  1. I usually have a specific [TabGroup] in my scripts to visually debug things in real-time, so I give [ReadOnly] properties to fields and follow them. Today I set a Coroutine variable in this tab, but when I apply [ReadOnly] to this variable they disappear when isn’t null. If I remove [ReadOnly] things work properly
  2. a. Create a Coroutine variable
    b. Give [OdinSerialize] attribute to it
    c. Give [ReadOnly] attribute to it
    d. Pass some coroutine to this variable in runtime
  3. 2020.3.2f1

  5. no
  6. Windows 10

Comments (2)

  1. Tor Esa Vestergaard

    I'm afraid Coroutine is not a serializable type and contains no information that would be pertinent to display in the inspector; if you want to know anything about the state of the routine, the variable to display would be the IEnumerator instance of the coroutine. The Coroutine value is just a handle for Unity to use.

  2. Joao Gabriel reporter

    The problems isn’t with coroutines being or not serialized, the problem is only that [ReadOnly] attribute is hidden variable value, if I remove the attribute things works just right

  3. Log in to comment