Ejemplo n.º 1
0
        public unsafe ref T GetDataRef(int index, INodeBlob blob, IBlackboard bb)
        {
            // NOTE: error CS8170: Struct members cannot return 'this' or other instance members by reference
            // return ref VariableRegisters<T>.GetDataRef(VariableId)(ref this, index, blob, bb);
            var ptr = UnsafeUtility.AddressOf(ref VariableRegisters <T> .GetDataRef(VariableId)(ref this, index, blob, bb));

            return(ref UnsafeUtilityEx.AsRef <T>(ptr));
        }
Ejemplo n.º 2
0
        static ComponentVariableProperty()
        {
            VariableRegisters <T> .Register(_DYNAMIC_ID, GetData, GetDataRef, GetDynamicAccess);

            VariableRegisters <T> .Register(_COPYTOLOCAL_ID, CopyAndGetData, CopyAndGetDataRef, GetCopyToLocalAccess);

            VariableRegisters <T> .Register(_LOCAL_ID, GetLocalData, GetLocalDataRef, GetCopyToLocalAccess);
        }
Ejemplo n.º 3
0
        static ComponentVariableProperty()
        {
            var type = typeof(ComponentVariableProperty <T>);

            VariableRegisters <T> .Register(_DYNAMIC_ID, type.Getter("GetData"), type.Getter("GetDataRef"), GetDynamicAccess);

            VariableRegisters <T> .Register(_COPYTOLOCAL_ID, type.Getter("CopyAndGetData"), type.Getter("CopyAndGetDataRef"), GetCopyToLocalAccess);

            VariableRegisters <T> .Register(_LOCAL_ID, type.Getter("GetLocalData"), type.Getter("GetLocalDataRef"), GetCopyToLocalAccess);
        }
Ejemplo n.º 4
0
        static NodeVariableProperty()
        {
            VariableRegisters <T> .Register(_ID_RUNTIME_NODE, GetRuntimeNodeData, GetRuntimeNodeDataRef);

            VariableRegisters <T> .Register(_ID_DEFAULT_NODE, GetDefaultNodeData, GetDefaultNodeDataRef);

            VariableRegisters <T> .Register(_ID_DEFAULT_NODE_VARIABLE, GetDefaultNodeVariable, GetDefaultNodeVariableRef);

            VariableRegisters <T> .Register(_ID_RUNTIME_NODE_VARIABLE, GetRuntimeNodeVariable, GetRuntimeNodeVariableRef);
        }
Ejemplo n.º 5
0
        static NodeVariableProperty()
        {
            var type = typeof(NodeVariableProperty <T>);

            VariableRegisters <T> .Register(_ID_RUNTIME_NODE, type.Getter("GetRuntimeNodeData"), type.Getter("GetRuntimeNodeDataRef"));

            VariableRegisters <T> .Register(_ID_DEFAULT_NODE, type.Getter("GetDefaultNodeData"), type.Getter("GetDefaultNodeDataRef"));

            VariableRegisters <T> .Register(_ID_DEFAULT_NODE_VARIABLE, type.Getter("GetDefaultNodeVariable"), type.Getter("GetDefaultNodeVariableRef"));

            VariableRegisters <T> .Register(_ID_RUNTIME_NODE_VARIABLE, type.Getter("GetRuntimeNodeVariable"), type.Getter("GetRuntimeNodeVariableRef"));
        }
Ejemplo n.º 6
0
 static ScriptableObjectVariableProperty()
 {
     VariableRegisters <T> .Register(ID, GetData, GetDataRef);
 }
        static ScriptableObjectVariableProperty()
        {
            var type = typeof(ScriptableObjectVariableProperty <T>);

            VariableRegisters <T> .Register(ID, type.Getter("GetData"), type.Getter("GetDataRef"));
        }
Ejemplo n.º 8
0
 static CustomVariableProperty()
 {
     VariableRegisters <T> .Register(ID, GetData, GetDataRef);
 }
Ejemplo n.º 9
0
 public T GetData <TNodeBlob, TBlackboard>(int index, ref TNodeBlob blob, ref TBlackboard bb)
     where TNodeBlob : struct, INodeBlob
     where TBlackboard : struct, IBlackboard
 {
     return(VariableRegisters <T> .GetData <TNodeBlob, TBlackboard>(VariableId)(ref this, index, ref blob, ref bb));
 }
Ejemplo n.º 10
0
        static CustomVariableProperty()
        {
            var type = typeof(CustomVariableProperty <T>);

            VariableRegisters <T> .Register(ID, type.Getter("GetData"), type.Getter("GetDataRef"));
        }
Ejemplo n.º 11
0
 public T GetData(int index, INodeBlob blob, IBlackboard bb)
 {
     return(VariableRegisters <T> .GetData(VariableId)(ref this, index, blob, bb));
 }
Ejemplo n.º 12
0
        public unsafe ref T GetDataRef(int index, INodeBlob blob, IBlackboard bb)
        {
            var ptr = UnsafeUtility.AddressOf(ref VariableRegisters <T> .GetDataRef(VariableId)(ref this, index, blob, bb));

            return(ref UnsafeUtilityEx.AsRef <T>(ptr));
        }