Exemple #1
0
            private void SetValue(Scene scene, object value, Action <object> set_callback)
            {
                if (value != null && value is UnityReference)
                {
                    UnityReference reference = value as UnityReference;

                    reference.UnitySetCallback = set_callback;

                    scene.AddUnityReference(reference);
                }
                else
                {
                    set_callback(value);
                }
            }
Exemple #2
0
        public static UnityReference FromUnity(Scene scene, UnityEngine.Object v)
        {
            UnityReference reference = null;

            if (v != null)
            {
                reference = new UnityReference();

                reference.type       = v.GetType();
                reference.id         = (uint)v.GetInstanceID();
                reference.unityValue = v;

                scene.AddUnityReference(reference);
            }

            return(reference);
        }