flagflag  
5: 2015-06-21 (Sun) 07:23:32 iseki source Cur: 2015-07-13 (Mon) 14:01:38 iseki source
Line 6: Line 6:
- http://docs.unity3d.com/jp/current/Scrip​tReference/ModelImporter.html - http://docs.unity3d.com/jp/current/Scrip​tReference/ModelImporter.html
- http://baba-s.hatenablog.com/entry/2015/​06/09/104109 - http://baba-s.hatenablog.com/entry/2015/​06/09/104109
 +- http://ft-lab.ne.jp/cgi-bin-unity/wiki.c​gi?page=unity_first
 +#br
 +*** Scripts [#t1147094]
 +**** Input.GetKeyDown(), Input.GetKeyUp() の取りこぼし [#t95d08ba]
 +- GetKeyDown(), GetKeyUp() 系は1フレームのみの通知なので,FixedUpdate() ではなく Update() に記述する.
#br #br
- using UnityEngine; 
- using UnityEditor; 
- using System.IO; 
- 
- public sealed class SelectColladaShader : AssetPostprocessor 
- { 
-   Material OnAssignMaterialModel(Material material,Renderer renderer) 
-   { 
-       string currentDir = Path.GetDirectoryName (assetPath); 
-       if (!AssetDatabase.IsValidFolder (currentDir + "/Materials")) { 
-           AssetDatabase.CreateFolder (currentDir, "Materials"); 
-       } 
- 
-       if (material.mainTexture == null) { 
-           return null; 
-       } 
-       string textureName = material.mainTexture.name; 
-       string materialPath = string.Format("{0}/Materials/{1}.mat", currentDir, textureName); 
- 
-       Material mt = AssetDatabase.LoadAssetAtPath<Material>(​materialPath); 
- 
-       if (mt==null) { 
-           material.shader = Shader.Find("Legacy Shaders/Transparent/Diffuse"); 
-           AssetDatabase.CreateAsset(material, materialPath); 
-           // 
-           mt = material; 
-       } 
- 
-       return mt; 
-   } 
- } 


Front page   New List of Pages Search Recent changes   Help   RSS of recent changes (RSS 1.0) RSS of recent changes (RSS 2.0) RSS of recent changes (RSS Atom)

Site Search

Login

Username:

Password:


Lost Password?
Register now!!

Sub Menu

mini Calendar

Last MonthMay 2024Next Month
Su Mo Tu We Th Fr Sa
1 2 3 4
5 6 7 8 9 10 11
12 13 14 15 16 17 18
19 20 21 22 23 24 25
26 27 28 29 30 31
Today

Who's Online

74 user(s) are online (30 user(s) are browsing xpwiki)

Members: 0
Guests: 74

more...

Access Counter

Today : 1029910299102991029910299
Yesterday : 1185711857118571185711857
Total : 2362202623622026236220262362202623622026236220262362202623622026
Powered by XOOPS Cube 2.1© 2001-2006 XOOPS Cube Project
Design by XoopsDesign.com