示例#1
0
        protected void Compass()
        {
            Type            type    = typeof(Compass);
            CommandsBuilder builder = new CommandsBuilder(type);

            builder.useClassName = true;
            manager.Add(builder.Build());
            manager.Add(new FuncCommand <bool>(() => UnityEngine.Input.compass.enabled)
            {
                alias = "enabled", className = type.Name
            });
            manager.Add(new FuncCommand <float>(() => UnityEngine.Input.compass.headingAccuracy)
            {
                alias = "headingAccuracy", className = type.Name
            });
            manager.Add(new FuncCommand <float>(() => UnityEngine.Input.compass.magneticHeading)
            {
                alias = "magneticHeading", className = type.Name
            });
            manager.Add(new FuncCommand <Vector3>(() => UnityEngine.Input.compass.rawVector)
            {
                alias = "rawVector", className = type.Name
            });
            manager.Add(new FuncCommand <double>(() => UnityEngine.Input.compass.timestamp)
            {
                alias = "timestamp", className = type.Name
            });
            manager.Add(new FuncCommand <float>(() => UnityEngine.Input.compass.trueHeading)
            {
                alias = "trueHeading", className = type.Name
            });
        }
示例#2
0
        protected void AppleReplayKit()
        {
#if UNITY_IOS
            Type            type    = typeof(UnityEngine.Apple.ReplayKit.ReplayKit);
            CommandsBuilder builder = new CommandsBuilder(type);
            builder.useClassName = true;
            builder.methodsSettings.AddExceptions("StartBroadcasting");
            manager.Add(builder.Build());

            UnityEngine.Apple.ReplayKit.ReplayKit.BroadcastStatusCallback broadcastCallback = (hasStarted, errorMessage) => {
                if (hasStarted)
                {
                    CommandsManager.SendMessage("Broadcast started successfully");
                }
                else
                {
                    CommandsManager.SendMessage("Broadcast couldn't get started. Error: " + errorMessage);
                }
            };
            Action <bool, bool> broadcastMethod = (enableMicrophone, enableCamera) => {
                UnityEngine.Apple.ReplayKit.ReplayKit.StartBroadcasting(broadcastCallback, enableMicrophone, enableCamera);
            };
            manager.Add(new ActionCommand <bool, bool>(broadcastMethod)
            {
                alias = "StartBroadcasting", className = type.Name
            });
#endif
        }
示例#3
0
        protected void PerformanceReporting()
        {
            CommandsBuilder builder = new CommandsBuilder(typeof(UnityEngine.Analytics.PerformanceReporting));

            builder.useClassName = true;
            manager.Add(builder.Build());
        }
示例#4
0
        protected void Physics2D()
        {
            Type            type    = typeof(Physics2D);
            CommandsBuilder builder = new CommandsBuilder(type);

            builder.useClassName = true;
            builder.methodsSettings.AddExceptions(
                "BoxCast", "BoxCastAll", "BoxCastNonAlloc", "CapsuleCast", "CapsuleCastAll", "CapsuleCastNonAlloc", "CircleCast", "CircleCastAll", "CircleCastNonAlloc",
                "Distance", "GetContacts", "GetIgnoreCollision", "GetRayIntersection", "GetRayIntersectionAll", "GetRayIntersectionNonAlloc", "IgnoreCollision",
                "IsTouching", "IsTouchingLayers", "Linecast", "LinecastAll", "LinecastNonAlloc", "OverlapAreaNonAlloc", "OverlapBoxNonAlloc",
                "OverlapCapsuleNonAlloc", "OverlapCircleNonAlloc", "OverlapCollider", "OverlapPoint", "OverlapPointNonAlloc", "Raycast", "RaycastAll", "RaycastNonAlloc"
                );
            builder.methodsSettings.AddExceptions(
                type.GetMethod("OverlapCapsule", new Type[] { typeof(Vector2), typeof(Vector2), typeof(CapsuleDirection2D), typeof(float), typeof(int) }),
                type.GetMethod("OverlapCapsule", new Type[] { typeof(Vector2), typeof(Vector2), typeof(CapsuleDirection2D), typeof(float), typeof(int), typeof(float) }),
                type.GetMethod("OverlapCapsule", new Type[] { typeof(Vector2), typeof(Vector2), typeof(CapsuleDirection2D), typeof(float), typeof(int), typeof(float), typeof(float) }),
                type.GetMethod("OverlapCapsuleAll", new Type[] { typeof(Vector2), typeof(Vector2), typeof(CapsuleDirection2D), typeof(float), typeof(int) }),
                type.GetMethod("OverlapCapsuleAll", new Type[] { typeof(Vector2), typeof(Vector2), typeof(CapsuleDirection2D), typeof(float), typeof(int), typeof(float) }),
                type.GetMethod("OverlapCapsuleAll", new Type[] { typeof(Vector2), typeof(Vector2), typeof(CapsuleDirection2D), typeof(float), typeof(int), typeof(float), typeof(float) }),
                type.GetMethod("OverlapArea", new Type[] { typeof(Vector2), typeof(Vector2), typeof(ContactFilter2D), typeof(Collider2D[]) }),
                type.GetMethod("OverlapBox", new Type[] { typeof(Vector2), typeof(Vector2), typeof(float), typeof(ContactFilter2D), typeof(Collider2D[]) }),
                type.GetMethod("OverlapCapsule", new Type[] { typeof(Vector2), typeof(Vector2), typeof(CapsuleDirection2D), typeof(float), typeof(ContactFilter2D), typeof(Collider2D[]) }),
                type.GetMethod("OverlapCircle", new Type[] { typeof(Vector2), typeof(float), typeof(ContactFilter2D), typeof(Collider2D[]) }),
                type.GetMethod("OverlapPoint", new Type[] { typeof(Vector2), typeof(ContactFilter2D), typeof(Collider2D[]) }),
                type.GetMethod("OverlapArea", new Type[] { typeof(Vector2), typeof(Vector2), typeof(int), typeof(float), typeof(float) }),
                type.GetMethod("OverlapAreaAll", new Type[] { typeof(Vector2), typeof(Vector2), typeof(int), typeof(float), typeof(float) }),
                type.GetMethod("OverlapBox", new Type[] { typeof(Vector2), typeof(Vector2), typeof(float), typeof(int), typeof(float) }),
                type.GetMethod("OverlapBox", new Type[] { typeof(Vector2), typeof(Vector2), typeof(float), typeof(int), typeof(float), typeof(float) }),
                type.GetMethod("OverlapBoxAll", new Type[] { typeof(Vector2), typeof(Vector2), typeof(float), typeof(int), typeof(float) }),
                type.GetMethod("OverlapBoxAll", new Type[] { typeof(Vector2), typeof(Vector2), typeof(float), typeof(int), typeof(float), typeof(float) }),
                type.GetMethod("OverlapCircle", new Type[] { typeof(Vector2), typeof(float), typeof(int), typeof(float), typeof(float) }),
                type.GetMethod("OverlapCircleAll", new Type[] { typeof(Vector2), typeof(float), typeof(int), typeof(float), typeof(float) })
                );
            manager.Add(builder.Build());
        }
示例#5
0
        protected void Debug()
        {
            Type            type    = typeof(Debug);
            CommandsBuilder builder = new CommandsBuilder(type);

            builder.useClassName = true;
            builder.methodsSettings.AddExceptions("Assert", "AssertFormat", "DrawLine", "DrawRay");
            builder.propertiesSettings.AddExceptions("logger");
            manager.Add(builder.Build());
            ILogger logger = UnityEngine.Debug.
#if UNITY_2017_1_OR_NEWER
                             unityLogger
#else
                             logger
#endif
            ;

            manager.Add(new ActionCommand <LogType>(value => logger.filterLogType = value)
            {
                alias = "filterLogType", className = type.Name
            });
            manager.Add(new ActionCommand <bool>(value => logger.logEnabled = value)
            {
                alias = "logEnabled", className = type.Name
            });
            manager.Add(new FuncCommand <LogType>(() => logger.filterLogType)
            {
                alias = "filterLogType", className = type.Name
            });
            manager.Add(new FuncCommand <bool>(() => logger.logEnabled)
            {
                alias = "logEnabled", className = type.Name
            });
        }
示例#6
0
        protected void Animator()
        {
            CommandsBuilder builder = new CommandsBuilder(typeof(Animator));

            builder.useClassName = true;
            manager.Add(builder.Build());
        }
示例#7
0
        protected void HumanTrait()
        {
            Type            type    = typeof(HumanTrait);
            CommandsBuilder builder = new CommandsBuilder(type);

            builder.useClassName = true;
            manager.Add(builder.Build());
        }
示例#8
0
        protected void PlayerConnection()
        {
            Type            type    = typeof(UnityEngine.Diagnostics.PlayerConnection);
            CommandsBuilder builder = new CommandsBuilder(type);

            builder.useClassName = true;
            manager.Add(builder.Build());
        }
示例#9
0
        protected void CrashReportHandler()
        {
            Type            type    = typeof(UnityEngine.CrashReportHandler.CrashReportHandler);
            CommandsBuilder builder = new CommandsBuilder(type);

            builder.useClassName = true;
            manager.Add(builder.Build());
        }
示例#10
0
        protected void SystemInfo()
        {
            Type            type    = typeof(SystemInfo);
            CommandsBuilder builder = new CommandsBuilder(type);

            builder.useClassName = true;
            manager.Add(builder.Build());
        }
示例#11
0
        protected void LightProbeProxyVolume()
        {
            Type            type    = typeof(LightProbeProxyVolume);
            CommandsBuilder builder = new CommandsBuilder(type);

            builder.useClassName = true;
            manager.Add(builder.Build());
        }
示例#12
0
        protected void SceneUtility()
        {
            Type            type    = typeof(UnityEngine.SceneManagement.SceneUtility);
            CommandsBuilder builder = new CommandsBuilder(type);

            builder.useClassName = true;
            manager.Add(builder.Build());
        }
示例#13
0
        protected void ReflectionProbe()
        {
            Type            type    = typeof(ReflectionProbe);
            CommandsBuilder builder = new CommandsBuilder(type);

            builder.useClassName = true;
            manager.Add(builder.Build());
        }
示例#14
0
        protected void RemoteSettings()
        {
            Type            type    = typeof(RemoteSettings);
            CommandsBuilder builder = new CommandsBuilder(type);

            builder.useClassName = true;
            manager.Add(builder.Build());
        }
示例#15
0
        protected void CrashReport()
        {
            Type            type    = typeof(CrashReport);
            CommandsBuilder builder = new CommandsBuilder(type);

            builder.useClassName = true;
            manager.Add(builder.Build());
        }
示例#16
0
        protected void Time()
        {
            Type            type    = typeof(Time);
            CommandsBuilder builder = new CommandsBuilder(type);

            builder.useClassName = true;
            manager.Add(builder.Build());
        }
示例#17
0
        protected void LayerMask()
        {
            Type            type    = typeof(LayerMask);
            CommandsBuilder builder = new CommandsBuilder(type);

            builder.useClassName = true;
            manager.Add(builder.Build());
        }
示例#18
0
        protected void Quaternion()
        {
            Type            type    = typeof(Quaternion);
            CommandsBuilder builder = new CommandsBuilder(type);

            builder.useClassName = true;
            manager.Add(builder.Build());
        }
示例#19
0
        protected void SortingLayer()
        {
            Type            type    = typeof(SortingLayer);
            CommandsBuilder builder = new CommandsBuilder(type);

            builder.useClassName = true;
            builder.propertiesSettings.AddExceptions("layers");
            manager.Add(builder.Build());
        }
示例#20
0
        protected void SamsungTV()
        {
#if !UNITY_2017_3_OR_NEWER
            Type            type    = typeof(SamsungTV);
            CommandsBuilder builder = new CommandsBuilder(type);
            builder.useClassName = true;
            manager.Add(builder.Build());
#endif
        }
示例#21
0
        protected void AppleTvRemote()
        {
#if UNITY_IOS
            Type            type    = typeof(UnityEngine.Apple.TV.Remote);
            CommandsBuilder builder = new CommandsBuilder(type);
            builder.className = "AppleTvRemote";
            manager.Add(builder.Build());
#endif
        }
示例#22
0
        protected void Font()
        {
            Type            type    = typeof(Font);
            CommandsBuilder builder = new CommandsBuilder(type);

            builder.useClassName = true;
            builder.methodsSettings.AddExceptions("CreateDynamicFontFromOSFont");
            manager.Add(builder.Build());
        }
示例#23
0
        protected void ProceduralMaterial()
        {
#if !UNITY_WEBGL && !UNITY_2018_1_OR_NEWER
            Type            type    = typeof(ProceduralMaterial);
            CommandsBuilder builder = new CommandsBuilder(type);
            builder.useClassName = true;
            manager.Add(builder.Build());
#endif
        }
示例#24
0
        protected void DynamicGI()
        {
            Type            type    = typeof(DynamicGI);
            CommandsBuilder builder = new CommandsBuilder(type);

            builder.useClassName = true;
            builder.methodsSettings.AddExceptions("SetEmissive");
            manager.Add(builder.Build());
        }
示例#25
0
        protected void Mathf()
        {
            Type            type    = typeof(Mathf);
            CommandsBuilder builder = new CommandsBuilder(type);

            builder.useClassName = true;
            builder.methodsSettings.AddExceptions("SmoothDamp", "SmoothDampAngle");
            manager.Add(builder.Build());
        }
示例#26
0
        protected void Application()
        {
            Type            type    = typeof(Application);
            CommandsBuilder builder = new CommandsBuilder(type);

            builder.useClassName = true;
            builder.methodsSettings.AddExceptions("RequestAdvertisingIdentifierAsync");
            manager.Add(builder.Build());
        }
示例#27
0
        protected void LightmapSettings()
        {
            Type            type    = typeof(LightmapSettings);
            CommandsBuilder builder = new CommandsBuilder(type);

            builder.useClassName = true;
            builder.propertiesSettings.AddExceptions("lightmaps", "lightProbes");
            manager.Add(builder.Build());
        }
示例#28
0
        protected void IOSDevice()
        {
#if UNITY_IOS
            Type            type    = typeof(UnityEngine.iOS.Device);
            CommandsBuilder builder = new CommandsBuilder(type);
            builder.className = "IOSDevice";
            manager.Add(builder.Build());
#endif
        }
示例#29
0
        protected void TouchScreenKeyboard()
        {
            Type            type    = typeof(TouchScreenKeyboard);
            CommandsBuilder builder = new CommandsBuilder(type);

            builder.methodsSettings.AddExceptions("Open");
            builder.useClassName = true;
            manager.Add(builder.Build());
        }
示例#30
0
        protected void Canvas()
        {
            Type            type    = typeof(Canvas);
            CommandsBuilder builder = new CommandsBuilder(type);

            builder.useClassName = true;
            builder.methodsSettings.AddExceptions("GetDefaultCanvasMaterial", "GetETC1SupportedCanvasMaterial");
            manager.Add(builder.Build());
        }