This article is a lot of content, from the Internet.
Environment: Unity3d 4.1,
The Unity3d script implements the color change and rotation of the model, noting that if the model is set to static, it cannot be rotated.
Function Description: Mouse drop to model, model color change, press mouse model to start rotation.
The script code is as follows:
Using unityengine;using System.collections;public class Test:monobehaviour {bool Tri1=false;bool tri2=false; Color orgcolor;//Use this for initializationvoid Start () {orgcolor = Renderer.material.color;} Update is called once per framevoid update () {if (TRI2) transform. Rotate (vector3.up* time.deltatime * 200); Vector4 t = renderer.lightmaptilingoffset;} void OnMouseOver () {Renderer.material.color = Color.yellow;tri1 = true;} void Onmouseexit () {renderer.material.color = Orgcolor;} void OnMouseDown () {if (TRI1) Tri2 = True;}}
I want to export the model in Unity3d to the obj file, search for it from the Internet, find the export script.
The steps are as follows:
1. Place EditorObjExporter.cs and ObjExporter.cs files in the editor directory of Unity
2, re-open Unity3d will appear the custom menu, under the menu will be exported
Download Link:
Unity3d model rotation and model export obj