예제 #1
0
 public void ExecuteTests()
 {
     selfReference = this;
     TestCustomEvents();
     TestFunctionParameters();
     TestIntermediateReturn();
 }
예제 #2
0
 public void ExecuteTests()
 {
     selfReference = this;
     TestCustomEvents();
     TestFunctionParameters();
     TestIntermediateReturn();
     TestObjectArrayArg();
     TestStringCopy();
 }
예제 #3
0
        public void ExecuteTests()
        {
            selfReference = this;
            TestCustomEvents();
            TestFunctionParameters();
            TestIntermediateReturn();
            TestObjectArrayArg();
            TestStringCopy();
            TestSetGetProgramVar();

            tester.TestAssertion("gameObject valid", gameObject.name == "LocalFunctionTests");
            MethodPropertyAliasingTest(gameObject.transform.parent.gameObject);
            tester.TestAssertion("gameObject valid 2", gameObject.name == "LocalFunctionTests");

            tester.TestAssertion("Variable declaration after methods", heyImDeclaredAfter == 4f);
        }
        void TestDelayed()
        {
            SendCustomEventDelayedSeconds(nameof(PrintThingDelayed), 4f);
            SendCustomEventDelayedSeconds(nameof(PrintThingDelayed), 4f, VRC.Udon.Common.Enums.EventTiming.Update);
            SendCustomEventDelayedSeconds(nameof(PrintThingDelayedLate), 4f, VRC.Udon.Common.Enums.EventTiming.LateUpdate);

            LocalFunctionTest myself = this;

            myself.SendCustomEventDelayedSeconds(nameof(PrintThingDelayed), 5f);
            myself.SendCustomEventDelayedFrames(nameof(PrintThingDelayed), 0);
            myself.SendCustomEventDelayedFrames(nameof(PrintThingDelayed), 1);
            myself.SendCustomEventDelayedFrames(nameof(PrintThingDelayedLate), 1, VRC.Udon.Common.Enums.EventTiming.LateUpdate);

            UdonBehaviour myselfUdon = (UdonBehaviour)(Component)myself;

            myselfUdon.SendCustomEventDelayedFrames(nameof(PrintThingDelayed), 10);
        }
예제 #5
0
        void TestDelayed()
        {
            SendCustomEventDelayedSeconds(nameof(PrintThingDelayed), 4f);
            SendCustomEventDelayedSeconds(nameof(PrintThingDelayed), 4f, VRC.Udon.Common.Enums.EventTiming.Update);
            SendCustomEventDelayedSeconds(nameof(PrintThingDelayedLate), 4f, VRC.Udon.Common.Enums.EventTiming.LateUpdate);

            LocalFunctionTest myself = this;

            myself.SendCustomEventDelayedSeconds(nameof(PrintThingDelayed), 5f);
            myself.SendCustomEventDelayedFrames(nameof(PrintThingDelayed), 0);
            myself.SendCustomEventDelayedFrames(nameof(PrintThingDelayed), 1);
            myself.SendCustomEventDelayedFrames(nameof(PrintThingDelayedLate), 1, VRC.Udon.Common.Enums.EventTiming.LateUpdate);

            // ReSharper disable once SuspiciousTypeConversion.Global
            // ReSharper disable once PossibleInvalidCastException
            UdonBehaviour myselfUdon = (UdonBehaviour)(Component)myself;

            myselfUdon.SendCustomEventDelayedFrames(nameof(PrintThingDelayed), 10);
        }