예제 #1
0
        private void OnGUI()
        {
            m_scrollPos = EditorGUILayout.BeginScrollView(m_scrollPos);

            EditorGUILayout.LabelField("Application", EditorStyles.boldLabel);

            var drawer = new Drawer(224);

            drawer.Draw("dataPath", Application.dataPath);
            drawer.Draw("consoleLogPath", Application.consoleLogPath);
            drawer.Draw("persistentDataPath", Application.persistentDataPath);
            drawer.Draw("streamingAssetsPath", Application.streamingAssetsPath);
            drawer.Draw("temporaryCachePath", Application.temporaryCachePath);

            EditorGUILayout.Space();
            EditorGUILayout.LabelField("EditorApplication", EditorStyles.boldLabel);

            drawer.Draw("applicationContentsPath", EditorApplication.applicationContentsPath);
            drawer.Draw("applicationPath", EditorApplication.applicationPath);

            EditorGUILayout.Space();
            EditorGUILayout.LabelField("InternalEditorUtility", EditorStyles.boldLabel);

            drawer.Draw("unityPreferencesFolder", InternalEditorUtility.unityPreferencesFolder);
            drawer.Draw("GetCrashReportFolder", InternalEditorUtility.GetCrashReportFolder());
            drawer.Draw("GetEditorAssemblyPath", InternalEditorUtility.GetEditorAssemblyPath());
            drawer.Draw("GetEngineAssemblyPath", InternalEditorUtility.GetEngineAssemblyPath());
            drawer.Draw("GetEngineCoreModuleAssemblyPath", InternalEditorUtility.GetEngineCoreModuleAssemblyPath());

            EditorGUILayout.EndScrollView();
        }
예제 #2
0
        public CompilerParams()
        {
            NamePackageDll = $"{Application.productName}.dll";
            PathSave       = GetDefaultPathSave();

            Dependencies = new List <string> {
                InternalEditorUtility.GetEngineCoreModuleAssemblyPath()
            };

            Version = "1.0.0.0";
        }
예제 #3
0
            internal static IEnumerable <SearchAction> ActionHandlers()
            {
                return(new[]
                {
                    new SearchAction(type, "locate", null, "locate")
                    {
                        handler = (item, context) =>
                        {
                            var sCSCode = item.description;

                            var c = new CSharpCodeProvider();
                            #pragma warning disable CS0618
                            var icc = c.CreateCompiler();
                            #pragma warning restore CS0618
                            var cp = new CompilerParameters();

                            cp.ReferencedAssemblies.Add("system.dll");
                            cp.ReferencedAssemblies.Add(InternalEditorUtility.GetEngineAssemblyPath());
                            cp.ReferencedAssemblies.Add(InternalEditorUtility.GetEngineCoreModuleAssemblyPath());
                            cp.ReferencedAssemblies.Add(InternalEditorUtility.GetEditorAssemblyPath());

                            cp.CompilerOptions = "/t:library";
                            cp.GenerateInMemory = true;

                            CompilerResults cr;
                            if (!CompileSource(sCSCode, icc, cp, out cr, true))
                            {
                                if (!CompileSource(sCSCode, icc, cp, out cr, false))
                                {
                                    return;
                                }
                            }

                            var a = cr.CompiledAssembly;
                            var o = a.CreateInstance("CSCodeEvaler.CSCodeEvaler");

                            var t = o.GetType();
                            var mi = t.GetMethod("EvalCode");

                            var s = mi.Invoke(o, null);
                            if (s != null && s.GetType() != typeof(void))
                            {
                                UnityEngine.Debug.Log(s);
                            }
                        }
                    }
                });
            }
예제 #4
0
 private static void OpenEngineCoreModuleAssemblyPath()
 {
     RevealInFinder(new FileInfo(InternalEditorUtility.GetEngineCoreModuleAssemblyPath()).Directory.FullName);
 }