I'm unsure as to how I would reference a scriptable object's variables within a struct from another class. I know I'd have to make a public Conversation, but I'm stuck understanding how I could access it's struct, and how I could access individual variables such as the Position, or line string array.
Is this method even viable or should I look at creating a different way of accomplishing a dialogue conversation scriptable object?
Thanks for any insights and help~
My current code:
[System.Serializable]
[CreateAssetMenu(fileName = "New Conversation", menuName = "Create/Conversation", order = 1)]
public class Conversation : ScriptableObject
{
[System.Serializable]
public struct LineData
{
public string[] line;
public string[] option;
public enum Position
{
BottomLeft,
BottomCentre,
BottomRight,
MiddleLeft,
MiddleCentre,
MiddleRight,
TopLeft,
TopCentre,
TopRight
}
public Position position;
public enum TextSpeed
{
Normal,
Slow,
Fast,
UltraFast
}
public TextSpeed textSpeed;
}
public LineData[] Line;
}
```