// TODO: Change the parameter to use a concrete type UGameInstance /// <summary> /// Used by the UGameInstance constructor to set this manager's owning game instance. /// </summary> public void SetGameInstance(UObject gameInstance) { if (gameInstance != null && gameInstance.GetClass().Address == Classes.UGameInstance) { Native_FTimerManager.SetGameInstance(Address, gameInstance.Address); } }
public static void AssertMapTest(UObject obj, IDictionary <long, string> p1, IDictionary <UObject, string> p2, IDictionary <Test_SimpleEnum, string> p3, IDictionary <Test_SimpleBlittableStruct, UObject> p4, IDictionary <TSoftClass <UObject>, TSoftClass <UObject> > p5, IDictionary <string, string> p6, IDictionary <FName, string> p7) { UClass unrealClass = obj.GetClass(); Tests.AssertEqual(p1[10], "tp1", unrealClass, "AssertMapTest.p1"); Tests.AssertEqual(p2[Tests.ActorClass], "tp2", unrealClass, "AssertMapTest.p2"); Tests.AssertEqual(p3[Test_SimpleEnum.Val3], "tp3", unrealClass, "AssertMapTest.p3"); Tests.AssertEqual(p4[new Test_SimpleBlittableStruct() { Val3 = 99 }], Tests.ActorClass, unrealClass, "AssertMapTest.p4"); Tests.AssertEqual(p5[TSoftClass <UObject> .Null], new TSoftClass <UObject>(Tests.ActorClass), unrealClass, "AssertMapTest.p5"); Tests.AssertEqual(p5[new TSoftClass <UObject>(Tests.ActorClass)], TSoftClass <UObject> .Null, unrealClass, "AssertMapTest.p5"); Tests.AssertEqual(p6["test123"], "tp6", unrealClass, "AssertMapTest.p6"); Tests.AssertEqual(p7[new FName("test1234")], "tp7", unrealClass, "AssertMapTest.p7"); }
public static void AssertSetTest(UObject obj, ISet <long> p1, ISet <UObject> p2, ISet <Test_SimpleEnum> p3, ISet <Test_SimpleBlittableStruct> p4, ISet <TSoftClass <UObject> > p5, ISet <string> p6, ISet <FName> p7) { UClass unrealClass = obj.GetClass(); Tests.Assert(p1.Contains(10), unrealClass, "AssertSetTest.p1"); Tests.Assert(p2.Contains(Tests.ActorClass), unrealClass, "AssertSetTest.p2"); Tests.Assert(p3.Contains(Test_SimpleEnum.Val3), unrealClass, "AssertSetTest.p3"); Tests.Assert(p4.Contains(new Test_SimpleBlittableStruct() { Val3 = 99 }), unrealClass, "AssertSetTest.p4"); Tests.Assert(p5.Contains(TSoftClass <UObject> .Null), unrealClass, "AssertSetTest.p5"); Tests.Assert(p5.Contains(new TSoftClass <UObject>(Tests.ActorClass)), unrealClass, "AssertSetTest.p5"); Tests.Assert(p6.Contains("test123"), unrealClass, "AssertSetTest.p6"); Tests.Assert(p7.Contains(new FName("test1234")), unrealClass, "AssertSetTest.p7"); }