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 }