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

                if (evnt != null)
                {
                    evnt(mapNameStr);
                }
            }
Example #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);
     }
 }
Example #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)));
         }
     }
 }
Example #4
0
 public FStringUnsafe(FScriptArray array)
 {
     this.Array = array;
 }
Example #5
0
 public TArrayUnsafe(FScriptArray array)
     : this()
 {
     CopyFrom(array);
 }
Example #6
0
 public FSoftObjectPathUnsafe(FName assetPathName, string subPathString)
 {
     this.assetPathName = assetPathName;
     this.subPathString = default(FScriptArray);
     FStringMarshaler.ToArray(ref this.subPathString, subPathString);
 }