static AutorunSyphon() { //only cache the assembly/update the instance/etc if the syphon instance already exists in the scene if (UnityEngine.Object.FindObjectOfType(typeof(Syphon)) != null) { if (!Syphon.assemblyIsUpdated()) { Syphon.cacheAssembly(); } EditorApplication.update += myUpdate; } }
{// static AutorunSyphon() { //only cache the assembly/update the instance/etc if the syphon instance already exists in the scene //but, using registered syphon clients/server scripts instead of 'finding' them in the scene. this is faster. if (UnityEngine.Object.FindObjectOfType(typeof(SyphonServerTexture)) != null || UnityEngine.Object.FindObjectOfType(typeof(SyphonClientTexture)) != null) { // if(Syphon.syphonScriptCount > 0){ if (!Syphon.assemblyIsUpdated()) { Syphon.cacheAssembly(); } EditorApplication.update += myUpdate; } }