Support for custom class variable

Reynold Erwandi 8 months ago in Game Creator updated by Marti (Lead Developer) 8 months ago 1

Game creator is really flexible with its Trigger, Conditions, and Actions. But the variable system is lacking custom class support. For simpler games, it may be enough using primitive variables. But when it's getting more complexity, we can't avoid using more struct/class and need a variable of that type. I tried a workaround using Unity Atoms, which utilizing ScriptableObject as variable and using it with my actions. But actions that come with Game Creator and others are using its variable system so I cannot use that action and if I tried to modify the system, then I have to make changes every update.

Unity version:
Game Creator version:

There are two reasons why we don't support custom class/struct Variables:

1. Unity doesn't have polymorphic serialization prior to 2019.3, and it's still a very unstable feature. So unless we use FullSerializer or Odin Serializer there's no way to go around this.

2. Using our custom pre-defined set of Variable types allows us to display the type required for a specific field. For example, when you need to select a Game Object from a drop down menu, we only show Local/Global/List variables that are of type Game Object.

If you have a specific use case, feel free to give us the details and we'll try to help you.