예제 #1
0
        // TODO: Unused. Find a way to trigger this.
        public void SendReloadScripts()
        {
            var executionType = GodotDebugTargetSelection.Instance.CurrentDebugTarget.ExecutionType;

            switch (executionType)
            {
            case ExecutionType.Launch:
                GodotVariantEncoder.Encode(
                    new List <GodotVariant> {
                    "reload_scripts"
                },
                    _godotRemoteDebuggerStream
                    );
                _godotRemoteDebuggerStream.Flush();
                break;

            case ExecutionType.PlayInEditor:
            case ExecutionType.Attach:
                var godotMessagingClient =
                    GodotPackage.Instance.GodotSolutionEventsListener?.GodotMessagingClient;
                godotMessagingClient?.SendRequest <ReloadScriptsResponse>(new ReloadScriptsRequest());
                break;

            default:
                throw new ArgumentOutOfRangeException(executionType.ToString());
            }
        }
예제 #2
0
        public void SendReloadScripts()
        {
            switch (_godotCmd.ExecutionType)
            {
            case ExecutionType.Launch:
                GodotVariantEncoder.Encode(
                    new List <GodotVariant> {
                    "reload_scripts"
                },
                    _godotRemoteDebuggerStream
                    );
                break;

            case ExecutionType.PlayInEditor:
            case ExecutionType.Attach:
                _godotCmd.GodotIdeClient.SendRequest <ReloadScriptsResponse>(new ReloadScriptsRequest());
                break;

            default:
                throw new NotImplementedException(_godotCmd.ExecutionType.ToString());
            }
        }