Unity3d model rotation and model export obj

Source: Internet
Author: User


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

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.