private void NativeCallback(ref FScriptArray mapName) { string mapNameStr = FStringMarshaler.FromArray(mapName, false); var evnt = managed.Delegate; if (evnt != null) { evnt(mapNameStr); } }
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); } }
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))); } } }
public FStringUnsafe(FScriptArray array) { this.Array = array; }
public TArrayUnsafe(FScriptArray array) : this() { CopyFrom(array); }
public FSoftObjectPathUnsafe(FName assetPathName, string subPathString) { this.assetPathName = assetPathName; this.subPathString = default(FScriptArray); FStringMarshaler.ToArray(ref this.subPathString, subPathString); }