Exemplo n.º 1
0
        public ViewportViewModel(bool createGui = true)
        {
            Editor.Current.ProjectChanged += p => NotifyOfPropertyChange(() => DisplayName);
            Game.Workspace.PlaceLoaded.Connect(p => NotifyOfPropertyChange(() => DisplayName));

            var viewportScript = new LocalScript
            {
                Name         = "ViewportScript",
                LinkedSource = "editor://Scripts/Viewport.lua",
                Identity     = ScriptIdentity.Editor,
                Parent       = Game.CoreEnvironment
            };

            viewportScript.Run(this);
        }
Exemplo n.º 2
0
        public static void RunScript(LocalScript script, string path)
        {
            var toRun = script.Value.Replace("{{path}}", path);

            TerminalService.Instance.Term(toRun);
        }