Object test = assembly. *AppDomainSetup ads = new AppDomainSetup() Ī() ĪppDomain newDomain = AppDomain.CreateDomain("newDomain") īyte rawAssembly = loadFile("/Users/Ferds/test.dll") Īssembly assembly = newDomain.Load(rawAssembly, null) */Īssembly assembly = Assembly.LoadFrom("./test.dll") Set the assembly file name to generate.ĬompilerResults cr = provider.CompileAssemblyFromSource(cp, sourceFile) ĭebug.LogError("Errors building " + sourceFile + " into " + cr.PathToAssembly) ĭebug.Log("Source " + sourceFile + " built into " + cr.PathToAssembly + " successfully.") ĭebug.Log(("1+2 ")) īool success = CompileCSharpCode("class Test ", "./test.dll") cp.ReferencedAssemblies.Add( "/Applications/Unity/Unity.app/Contents/Frameworks/Managed/UnityEngine.dll" ) Ĭp.ReferencedAssemblies.Add( "C:/Program Files (x86)/Unity/Editor/Data/Managed/UnityEngine.dll" ) The primary usage for scriptable objects is to store data inside a Unity asset as an alternative to reading data from a file at runtime or containing the data inside a component attached to a GameObject.Unity assets are anything found inside the Project pane audio clips and scripts fall under this category too. Build the parameters for source compilation.ĬompilerParameters cp = new CompilerParameters() Ĭp.ReferencedAssemblies.Add( "System.dll" ) ![]() ![]() Public static bool CompileCSharpCode(string sourceFile, string exeFile)ĬSharpCodeProvider provider = new CSharpCodeProvider() echo 'export PATH=/Applications/Unity/Unity.app/Contents/Frameworks/Mono/bin:$PATH' > ~/.profile
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |