- Home /
Event or hook for executing code before unity opens and compiles/loads the project.
I want to know if there is any way I can execute some function in unity editor which allow me to copy some files in project before unity starts and loads the scene. It should run only once when project opened.
I have tried [initializeonload] but unity compiles the code before it runs and shows files missing errors, which I might have copied in initializeonload. [initializeonload] code does not run in this case.
is there any way?
Answer by Elarm00 · Jun 21, 2017 at 02:25 PM
I`m not sure if this is possible with Unity, but you can always write some batch script that would copy all the necessary files and then launch Unity.
Yes, you are right but this way I have to create batch script for all projects ins$$anonymous$$d of using Unity's project selector window. Anyway conclusion is its not possible.
Thanks.
Your answer
Follow this Question
Related Questions
Creating an texture asset in editor script 2 Answers
How can i create a pup-up menu like the one for choose the shader on materials in unity 2019? 1 Answer
how to stop reorderable list from passing Event value to the new element 1 Answer
Create a custom window and set his position on second screen 1 Answer
Custom inspector difficulties creating a Box / Group like widget 1 Answer