Automatically generated script plug-in [script create Dialog], probably the name and the script generator is too different, now the development tool is too strong, so was buried. Supported Unity versions 3.4.2 and above, legacy resources from ancient times. Try it out and feel like having this plugin when you just learned the unity script can save you a lot of time reading the API.
Recently wrote the code again to make lazy ...
Feel like each new script to write a bunch of simple and repetitive things to be bored, so search for the automatic generation of script plugin.
Plug-in effects
How to use
1. Download my modified Plugin
Link: https://pan.baidu.com/s/1oa8r ... Password: 6ZLN
2. Download the official plugin and fix the script error
Official download Address: https://assetstore.unity.com/...
If you import the plug-in, the following error occurs:
Assets/createscriptdialog/editor/newscriptwindow.cs (454,47): Error CS0117: UnityEditorInternal.InternalEditorUtility' does not contain a definition for
addscriptcomponentunchecked '
Change the error part code to:
if (Canaddcomponent ()) { //need to use reflection to access this now (it is internal) MethodInfo Addscriptmethod = typeof (Internaleditorutility). GetMethod ( "addscriptcomponentuncheckedundoable", bindingflags.static | BindingFlags.NonPublic); Addscriptmethod.invoke (NULL, new object[] {m_gameobjecttoaddto, Assetdatabase.loadassetatpath (TargetPath (), typeof (Monoscript)) as Monoscript});}
3. Right-click to use
Assets window Right-click >create>script ... Open the window to use.
4. You can customize the new script template
The instructions for use can be seen in readme.html.
The method template can be seen in MonoBehaviour.functions.txt. You can add a custom template based on the rule.
Baseclass=monobehaviourusing unityengine;using system.collections;using System.collections.generic;public class $ Classname:monobehaviour { $Functions}
void Awake () Awake is called when the script instance is being loaded. DEFAULT void Start () Start is called just before any of the Update methods is called the first time. DEFAULT void Update () update is called every frame, if the Monobehaviour are Enabled.void lateupdate () lateupdate is called Every frame, if the behaviour is Enabled.void fixedupdate () This function is called every fixed framerate frame, if the M Onobehaviour is Enabled.void Ongui () Ongui are called for rendering and handling GUI events.void onenable () This function I s called when the object becomes enabled and Active.void ondisable () This function is called when the behaviour becomes DI Sabled () or inactive.void OnDestroy () This function was called when the Monobehaviour would be destroyed.void reset () reset to default values. HEADER physicsvoid Ontriggerenter (Collider Other) Ontriggerenter are called when the Collider and other enters the trigger.void Ontriggerexit (Collider Other) Ontriggerexit was called when the Collider otherHave stopped touching the trigger.void Ontriggerstay (Collider Other) Ontriggerstay are called once per frame for every Colli Der Other that's touching the trigger.void Oncollisionenter (collision collision) Oncollisionenter is called when this col Lider/rigidbody has begun touching another rigidbody/collider.void oncollisionexit (collision collisionInfo) Oncollisionexit is called if this collider/rigidbody have stopped touching another rigidbody/collider.void OnCollisionSt Ay (collision collisioninfo) Oncollisionstay is called once per frame for every collider/rigidbody so is touching rigidbo Dy/collider.void Oncontrollercolliderhit (Controllercolliderhit hit) Oncontrollercolliderhit was called when the Controller hits a collider while performing a move.void onjointbreak (float breakforce) Called when a joint attached to the Same Game Object Broke.void onparticlecollision (Gameobject Other) onparticlecollision was called when a particle hits a co Llider. HEADER mousevoid onmouseenter () onmouseenteCalled when the mouse entered the guielement or collider.void OnMouseOver () OnMouseOver are called every frame while T He mouse is over the guielement or collider.void onmouseexit () Onmouseexit was called when the mouse was not a longer over The Guielement or collider.void OnMouseDown () OnMouseDown is called when the user have pressed the mouse button while over The Guielement or collider.void OnMouseUp () OnMouseUp is called when the user has released the mouse button.void Onmouseu Pasbutton () Onmouseupasbutton is only called when the mouse are released over the same guielement or Collider as it was pre Ssed.void Onmousedrag () Onmousedrag is called when the user have clicked on a guielement or Collider and is still holding D Own the mouse. HEADER playbackvoid onlevelwasloaded (int level) This function is called after a new level was loaded.void ONAPPLICATIONFOC US (bool focus) Sent to all game objects when the player Gets or looses focus.void onapplicationpause (bool pause) Sent to a LL game OBJects when the player Pauses.void Onapplicationquit () Sent to all game objects before the application is quit. HEADER renderingvoid onbecamevisible () onbecamevisible is called when the renderer became visible by any camera.void Onbec Ameinvisible () onbecameinvisible is called when the renderer are no longer visible by any camera.void onprecull () onprecull is called before a camera culls the scene.void OnPreRender () OnPreRender is called before a camera starts rendering the s Cene.void Onpostrender () Onpostrender is called after a camera finished rendering the Scene.void onrenderobject () OnRender Object is called after camera have rendered the Scene.void onwillrenderobject () Onwillrenderobject is called once for each Camera if the object is Visible.void onrenderimage (rendertexture source, rendertexture destination) Onrenderimage is Calle D after all rendering are complete to render Imageheader gizmosvoid ondrawgizmosselected () Implement this Ondrawgizmosselec Ted if you want to draw gizmos onlyIf the object is a selected.void Ondrawgizmos () Implement This ondrawgizmos if you want to draw gizmos it is also pickabl E and always drawn. HEADER networkvoid onplayerconnected (networkplayer player) called on the server whenever a new player have successfully con Nected.void onserverinitialized () called on the server whenever a network.initializeserver is invoked and has COMPLETED.V OID Onconnectedtoserver () called on the client when you have successfully connected to a server.void onplayerdisconnected ( Networkplayer player) called on the server whenever a player disconnected from the server.void ondisconnectedfromserver (Ne Tworkdisconnection info) called on the client when the connection is lost or you disconnected from the server.void onfail Edtoconnect (networkconnectionerror error) called on the client if a connection attempt fails for some reason.void onfail Edtoconnecttomasterserver (networkconnectionerror info) called on clients or servers when there are a problem connecting to The MAsterserver.void onmasterserverevent (masterserverevent msevent) called on clients or servers when reporting events from th E Masterserver. void Onnetworkinstantiate (Networkmessageinfo info) called on objects which has been network instantiated with Network.ins Tantiatevoid Onserializenetworkview (Bitstream stream, Networkmessageinfo info) used to customize synchronization of Variables in a script watched by a network view.
Custom Features
Modified plugins: Links: https://pan.baidu.com/s/1oa8r ... Password: 6ZLN
The following features have been modified or added:
1. Fixed "unityeditorinternal.internaleditorutility" error.
2. Add template Mymono (copy C # monobehaviour template).
3. Select Custom Template Mymono by default.
4. Added the current creation date.
5. Comments can be deleted (previously deleted comments will also have//).
6. Added support for access modifiers.
7. Reorder the APIs.
8. Package version Unity5.3.4.