SharedVariable name not showing

ConjureETS

New member
Hello

I created two SharedVariables. They compile correctly and I can create them, but their names doesn't show in the Variables tab. I added my SharedVariable code and pictures of the editor.
 

Attachments

  • Capture_01.JPG
    Capture_01.JPG
    28.1 KB · Views: 8
  • Capture_02.JPG
    Capture_02.JPG
    19.5 KB · Views: 7
  • Capture_03.JPG
    Capture_03.JPG
    23.1 KB · Views: 7
They should be serialized (adding the [SerializeField] to my public fields doesn't seems to make a difference). I added an other screen capture.
 

Attachments

  • Capture_04.JPG
    Capture_04.JPG
    34.9 KB · Views: 5
Can you reproduce it within a fresh project? I just tried a similar setup and all of the variables showed.

Code:
using UnityEngine;
using BehaviorDesigner.Runtime;

[System.Serializable]
public struct Vertex
{
    public int Id;
    public Vector3 Position;
}

public enum EdgeType { Cooridor, Door, Vent };

public struct Edge
{
    public int Id;
    public int VertexA;
    public int VertexB;
    public bool Traversable;
    public EdgeType Type;
}

[System.Serializable]
public class LevelGraph
{
    public Vertex[] Verticies;
    public Edge[] Edges;

}

[System.Serializable]
public class SharedLevelGraph : SharedVariable<LevelGraph>
{
    public override string ToString() { return mValue == null ? "null" : mValue.ToString(); }
    public static implicit operator SharedLevelGraph(LevelGraph value) { return new SharedLevelGraph { mValue = value }; }
}


1625736442920.png
 
I found the problem! I had a constructor method with parameters in LevelGraph. I needed to add one with no parameters (like in the attached picture). Thanks for the help!
 

Attachments

  • Capture_05.JPG
    Capture_05.JPG
    45.8 KB · Views: 5
Top