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 }); }
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 }
protected void PerformanceReporting() { CommandsBuilder builder = new CommandsBuilder(typeof(UnityEngine.Analytics.PerformanceReporting)); builder.useClassName = true; manager.Add(builder.Build()); }
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()); }
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 }); }
protected void Animator() { CommandsBuilder builder = new CommandsBuilder(typeof(Animator)); builder.useClassName = true; manager.Add(builder.Build()); }
protected void HumanTrait() { Type type = typeof(HumanTrait); CommandsBuilder builder = new CommandsBuilder(type); builder.useClassName = true; manager.Add(builder.Build()); }
protected void PlayerConnection() { Type type = typeof(UnityEngine.Diagnostics.PlayerConnection); CommandsBuilder builder = new CommandsBuilder(type); builder.useClassName = true; manager.Add(builder.Build()); }
protected void CrashReportHandler() { Type type = typeof(UnityEngine.CrashReportHandler.CrashReportHandler); CommandsBuilder builder = new CommandsBuilder(type); builder.useClassName = true; manager.Add(builder.Build()); }
protected void SystemInfo() { Type type = typeof(SystemInfo); CommandsBuilder builder = new CommandsBuilder(type); builder.useClassName = true; manager.Add(builder.Build()); }
protected void LightProbeProxyVolume() { Type type = typeof(LightProbeProxyVolume); CommandsBuilder builder = new CommandsBuilder(type); builder.useClassName = true; manager.Add(builder.Build()); }
protected void SceneUtility() { Type type = typeof(UnityEngine.SceneManagement.SceneUtility); CommandsBuilder builder = new CommandsBuilder(type); builder.useClassName = true; manager.Add(builder.Build()); }
protected void ReflectionProbe() { Type type = typeof(ReflectionProbe); CommandsBuilder builder = new CommandsBuilder(type); builder.useClassName = true; manager.Add(builder.Build()); }
protected void RemoteSettings() { Type type = typeof(RemoteSettings); CommandsBuilder builder = new CommandsBuilder(type); builder.useClassName = true; manager.Add(builder.Build()); }
protected void CrashReport() { Type type = typeof(CrashReport); CommandsBuilder builder = new CommandsBuilder(type); builder.useClassName = true; manager.Add(builder.Build()); }
protected void Time() { Type type = typeof(Time); CommandsBuilder builder = new CommandsBuilder(type); builder.useClassName = true; manager.Add(builder.Build()); }
protected void LayerMask() { Type type = typeof(LayerMask); CommandsBuilder builder = new CommandsBuilder(type); builder.useClassName = true; manager.Add(builder.Build()); }
protected void Quaternion() { Type type = typeof(Quaternion); CommandsBuilder builder = new CommandsBuilder(type); builder.useClassName = true; manager.Add(builder.Build()); }
protected void SortingLayer() { Type type = typeof(SortingLayer); CommandsBuilder builder = new CommandsBuilder(type); builder.useClassName = true; builder.propertiesSettings.AddExceptions("layers"); manager.Add(builder.Build()); }
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 }
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 }
protected void Font() { Type type = typeof(Font); CommandsBuilder builder = new CommandsBuilder(type); builder.useClassName = true; builder.methodsSettings.AddExceptions("CreateDynamicFontFromOSFont"); manager.Add(builder.Build()); }
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 }
protected void DynamicGI() { Type type = typeof(DynamicGI); CommandsBuilder builder = new CommandsBuilder(type); builder.useClassName = true; builder.methodsSettings.AddExceptions("SetEmissive"); manager.Add(builder.Build()); }
protected void Mathf() { Type type = typeof(Mathf); CommandsBuilder builder = new CommandsBuilder(type); builder.useClassName = true; builder.methodsSettings.AddExceptions("SmoothDamp", "SmoothDampAngle"); manager.Add(builder.Build()); }
protected void Application() { Type type = typeof(Application); CommandsBuilder builder = new CommandsBuilder(type); builder.useClassName = true; builder.methodsSettings.AddExceptions("RequestAdvertisingIdentifierAsync"); manager.Add(builder.Build()); }
protected void LightmapSettings() { Type type = typeof(LightmapSettings); CommandsBuilder builder = new CommandsBuilder(type); builder.useClassName = true; builder.propertiesSettings.AddExceptions("lightmaps", "lightProbes"); manager.Add(builder.Build()); }
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 }
protected void TouchScreenKeyboard() { Type type = typeof(TouchScreenKeyboard); CommandsBuilder builder = new CommandsBuilder(type); builder.methodsSettings.AddExceptions("Open"); builder.useClassName = true; manager.Add(builder.Build()); }
protected void Canvas() { Type type = typeof(Canvas); CommandsBuilder builder = new CommandsBuilder(type); builder.useClassName = true; builder.methodsSettings.AddExceptions("GetDefaultCanvasMaterial", "GetETC1SupportedCanvasMaterial"); manager.Add(builder.Build()); }