I Can access global variables defined in ORK with CS sharp
Can I access global variables defined in C sharp with ORK?
They do not appear as candidates in [Change Variable].
ORK3 3.16.2
using UnityEngine;
using GamingIsLove.ORKFramework;
using GamingIsLove.Makinom;
using GamingIsLove.Makinom.Components;
namespace GamingIsLove.ORKFramework {
public class teset : MonoBehaviour{
public int test;
}}
You can set the variable in C# and as long as the key name matches, Change Variable will apply to that same variable.
I have a variable defined in C#.
When I change the variable with Change Variable in ORK.
DntDestroyOnLoad>_Makinom>Int Variable
I can see that the target variable has been changed.
However, Debug.Log in C# below does not update the value.
It does not appear that the variable defined in C# has been changed.
using UnityEngine;
using GamingIsLove.ORKFramework;
using GamingIsLove.Makinom;
using GamingIsLove.Makinom.Components;
namespace GamingIsLove.ORKFramework {
public class test : MonoBehaviour{
public int test;
void Update()
{ Debug.Log("testvariable" + testvariable); }}}
Do you mean Makinom Variables, or C# Variables?
Change Variable only affects Makinom Variables. Makinom Variables can be set and gathered in code by:
Maki.Game.Variables.Set("VariableName", value);
Maki.Game.Variables.GetBool("VariableName"); (replace bool with other types, etc.)
---
If you want to see or modify C# Variables, or fields, you need to use a Check Fields or Change Fields node which will want the object containing the component, and the class name.
I understood that Makinom Variable and C# Variables are different and
I understood that Change Variable only affects Makinom Variables.
Thank you very much for your answer.