AssetDatabase.Refresh(); AssetDatabase.ImportAsset( path, ImportAssetOptions.ForceSynchronousImport ); var gameObj = target.gameObject; var script = AssetDatabase.LoadAssetAtPath( path.MakeRelativePath(), typeof( MonoScript ) ) as MonoScript; InternalEditorUtility.AddScriptComponentUnchecked( gameObj, script ); #region Delayed execution // Declared with null value to eliminate "uninitialized variable" // compiler error in lambda below. EditorApplication.CallbackFunction callback = null;
AddScriptComponentUncheckedUndoable
InternalEditorUtility
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)