コード例 #1
0
            private void NativeCallback(ref FScriptArray mapName)
            {
                string mapNameStr = FStringMarshaler.FromArray(mapName, false);
                var    evnt       = managed.Delegate;

                if (evnt != null)
                {
                    evnt(mapNameStr);
                }
            }
コード例 #2
0
 private void NativeCallback(ref FScriptArray mapName)
 {
     try
     {
         string mapNameStr = FStringMarshaler.FromArray(mapName, false);
         var    evnt       = managed.Delegate;
         if (evnt != null)
         {
             evnt(mapNameStr);
         }
     }
     catch (Exception e)
     {
         FMessage.LogDelegateException(e);
     }
 }
コード例 #3
0
 public void CopyFrom(FScriptArray array)
 {
     Clear();
     nativeArray->AddZeroed(numBytesPerElement, array.Count);
     for (int i = 0; i < array.Count; i++)
     {
         IntPtr address = IntPtr.Add(nativeArray->Data, numBytesPerElement * i);
         if (isUObject)
         {
             Add((T)(object)GCHelper.Find(address));
         }
         else if (isString)
         {
             Add((T)(object)FStringMarshaler.FromPtr(address));
         }
         else
         {
             Add((T)Marshal.PtrToStructure(address, typeof(T)));
         }
     }
 }
コード例 #4
0
 public FStringUnsafe(FScriptArray array)
 {
     this.Array = array;
 }
コード例 #5
0
 public TArrayUnsafe(FScriptArray array)
     : this()
 {
     CopyFrom(array);
 }
コード例 #6
0
 public FSoftObjectPathUnsafe(FName assetPathName, string subPathString)
 {
     this.assetPathName = assetPathName;
     this.subPathString = default(FScriptArray);
     FStringMarshaler.ToArray(ref this.subPathString, subPathString);
 }