블로그 이미지
Every unexpected event is a path to learning for you. blueasa

카테고리

분류 전체보기 (2794)
Unity3D (852)
Programming (478)
Server (33)
Unreal (4)
Gamebryo (56)
Tip & Tech (185)
협업 (11)
3DS Max (3)
Game (12)
Utility (68)
Etc (98)
Link (32)
Portfolio (19)
Subject (90)
iOS,OSX (55)
Android (14)
Linux (5)
잉여 프로젝트 (2)
게임이야기 (3)
Memories (20)
Interest (38)
Thinking (38)
한글 (30)
PaperCraft (5)
Animation (408)
Wallpaper (2)
재테크 (18)
Exercise (3)
나만의 맛집 (3)
냥이 (10)
육아 (16)
Total
Today
Yesterday

[사용 함수]

Camera.WorldToViewportPoint()

Camera.ViewportToWorldpoint()


1 public void pushObjectBackInFrustum(Transform obj) 2 { 3 Vector3 pos = Camera.main.WorldToViewportPoint(obj.position); 4 5 if(pos.x < 0f) 6 pos.x = 0f; 7 8 if(pos.x > 1f) 9 pos.x = 1f; 10 11 if(pos.y < 0f) 12 pos.y = 0f; 13 14 if(pos.y > 1f) 15 pos.y = 1f; 16 17 obj.position = Camera.main.ViewportToWorldPoint(pos); 18 }



참조 : http://forum.unity3d.com/threads/7069-Keeping-things-inside-the-camera-frustum

반응형
Posted by blueasa
, |

Well, just take the example from the GUI slider reference and from Animation.Sample and you're done.

  1. private var hSliderValue : float = 0.0;
  2. private var myAnimation : AnimationState;
  3.  
  4. function Start(){
  5. myAnimation = animation["MyClip"];
  6. }
  7.  
  8. function LateUpdate() {
  9. myAnimation.time = hSliderValue;
  10. myAnimation.enabled = true;
  11.  
  12. animation.Sample();
  13. myAnimation.enabled = false;
  14. }
  15.  
  16. function OnGUI() {
  17. hSliderValue = GUILayout.HorizontalSlider (hSliderValue, 0.0, myAnimation.length,GUILayout.Width(100.0f));
  18. }



출처 : http://answers.unity3d.com/questions/59406/using-gui-slider-to-control-animation-on-object.html

반응형

'Unity3D > Script' 카테고리의 다른 글

마우스 휠 스크롤 확인  (0) 2013.01.31
오브젝트 카메라 프러스텀 안에 가두기  (0) 2013.01.29
InGame Button  (0) 2012.12.14
InvokeRepeating  (0) 2012.12.07
DisplayWizard(에디터로 쓸모가 많을 듯 한..)  (0) 2012.12.04
Posted by blueasa
, |

링크 : http://forum.unity3d.com/threads/159693-GenerateSecondaryUVSet-destroying-mesh



Answering to my own thread here.

It seems like the MeshMerger script from the wiki itself was causing this trouble. On fourth thought and investigation it seems like copying of triangles and vertices is kind of buggy in the script, so finally I also saw some lonesome vertices flowing in the world after combining. Therefore it might not be the best idea to use that script at all.

Nevertheless, the CombineChildren script from the Standard Assets turned out to be a much better basis to work with. I've rewritten parts of it now to suit my needs, which basically is generating the combined static geometry in the editor and being able to generate lightmaps for this as well. Works like a charm!

I've seen this topic multiple times in the community without a real solution, so it might be a good idea to have a script ready for this. No big adjustment, but I hope it helps some people out there. Here it is, use it as you wish.

CombineChildrenAdvanced.cs
Usage: Place this anywhere in your project and attach it to the parent gameObject containing the other meshes to be combined.
Basically it delivers the very same feature as the standard CombineChildren script, yet it needs to be executed in the editor.
By default it'll automatically generate the lightmapping UVs for the combined geometry. If you don't want this to happen, either use the CombineChildren.cs from the Standard Assets, or uncheck the corresponding checkbox.
If you want to split geometry up again, just use the corresponding button. It'll reset everything accordingly.

Code:  
  1. using UnityEngine;
  2. using System.Collections;
  3. /*
  4. Attach this script as a parent to some game objects. Then by using the corresponding controls you may generate combined meshes (with lightmapping UVs).
  5. This is useful as a performance optimization since it is faster to render one big mesh than many small meshes. See the docs on graphics performance optimization for more info.
  6.  
  7. Different materials will cause multiple meshes to be created, thus it is useful to share as many textures/material as you can.
  8. NOTE: Using multiple materials may break things due to lightmapping generation. So lightmapping UVs as well as splitting the combined geometry is not supported.
  9. Workaround: Create hierarchies in which the children only have exactly one material.
  10. */
  11.  
  12. [AddComponentMenu("Mad Vulture Games/Combine Children 1.5")]
  13. public class CombineChildrenAdvanced : MonoBehaviour {
  14.    
  15.     /// Usually rendering with triangle strips is faster.
  16.     /// However when combining objects with very low triangle counts, it can be faster to use triangles.
  17.     /// Best is to try out which value is faster in practice.
  18.     public bool generateTriangleStrips = true;
  19.     public bool generateLightmappingUVs = true;
  20.     public bool isCombined = false;
  21.    
  22.     public void Combine() {
  23.         Component[] filters  = GetComponentsInChildren(typeof(MeshFilter));
  24.        
  25.         if (filters.Length <= 1) {
  26.             Debug.LogWarning ("Not enough meshes to combine!");
  27.             return;
  28.         }
  29.        
  30.         Matrix4x4 myTransform = transform.worldToLocalMatrix;
  31.         Hashtable materialToMesh= new Hashtable();
  32.        
  33.         for (int i=0;i<filters.Length;i++) {
  34.             MeshFilter filter = (MeshFilter)filters[i];
  35.             Renderer curRenderer  = filters[i].renderer;
  36.             MeshCombineUtility.MeshInstance instance = new MeshCombineUtility.MeshInstance ();
  37.             instance.mesh = filter.sharedMesh;
  38.             if (curRenderer != null && curRenderer.enabled && instance.mesh != null) {
  39.                 instance.transform = myTransform * filter.transform.localToWorldMatrix;
  40.                
  41.                 Material[] materials = curRenderer.sharedMaterials;
  42.                 for (int m=0;m<materials.Length;m++) {
  43.                     instance.subMeshIndex = System.Math.Min(m, instance.mesh.subMeshCount - 1);
  44.    
  45.                     ArrayList objects = (ArrayList)materialToMesh[materials[m]];
  46.                     if (objects != null) {
  47.                         objects.Add(instance);
  48.                     }
  49.                     else
  50.                     {
  51.                         objects = new ArrayList ();
  52.                         objects.Add(instance);
  53.                         materialToMesh.Add(materials[m], objects);
  54.                     }
  55.                 }
  56.                
  57.                 curRenderer.enabled = false;
  58.             }
  59.         }
  60.    
  61.         foreach (DictionaryEntry de  in materialToMesh) {
  62.             ArrayList elements = (ArrayList)de.Value;
  63.             MeshCombineUtility.MeshInstance[] instances = (MeshCombineUtility.MeshInstance[])elements.ToArray(typeof(MeshCombineUtility.MeshInstance));
  64.  
  65.             // We have a maximum of one material, so just attach the mesh to our own game object
  66.             if (materialToMesh.Count == 1)
  67.             {
  68.                 // Make sure we have a mesh filter & renderer
  69.                 if (GetComponent(typeof(MeshFilter)) == null)
  70.                     gameObject.AddComponent(typeof(MeshFilter));
  71.                 if (!GetComponent("MeshRenderer"))
  72.                     gameObject.AddComponent("MeshRenderer");
  73.    
  74.                 MeshFilter filter = (MeshFilter)GetComponent(typeof(MeshFilter));
  75.                 filter.mesh = MeshCombineUtility.Combine(instances, generateTriangleStrips);
  76.                 renderer.material = (Material)de.Key;
  77.                 renderer.enabled = true;
  78.             }
  79.             // We have multiple materials to take care of, build one mesh / gameobject for each material
  80.             // and parent it to this object
  81.             else
  82.             {
  83.                 GameObject go = new GameObject("Combined mesh");
  84.                 go.transform.parent = transform;
  85.                 go.transform.localScale = Vector3.one;
  86.                 go.transform.localRotation = Quaternion.identity;
  87.                 go.transform.localPosition = Vector3.zero;
  88.                 go.AddComponent(typeof(MeshFilter));
  89.                 go.AddComponent("MeshRenderer");
  90.                 go.renderer.material = (Material)de.Key;
  91.                 MeshFilter filter = (MeshFilter)go.GetComponent(typeof(MeshFilter));
  92.                 filter.mesh = MeshCombineUtility.Combine(instances, generateTriangleStrips);
  93.             }
  94.         }
  95.        
  96.         isCombined = true;
  97.     }
  98. }






CombineChildrenAdvancedEditor.cs
Usage: Place this in your Assets/Editor folder, it actually contains the main part of it.

Code:  
  1. using UnityEngine;
  2. using UnityEditor;
  3. using System.Collections;
  4.  
  5. [CustomEditor(typeof(CombineChildrenAdvanced))]
  6. public class CombineChildrenAdvancedEditor : Editor {
  7.  
  8.     CombineChildrenAdvanced _target;
  9.    
  10.     void OnEnable() {
  11.         _target = (CombineChildrenAdvanced)target;
  12.     }
  13.    
  14.    
  15.    
  16.     public override void OnInspectorGUI() {
  17.        
  18.        
  19.         _target.generateTriangleStrips = EditorGUILayout.Toggle("Generate Triangle Strips", _target.generateTriangleStrips);
  20.         _target.generateLightmappingUVs = EditorGUILayout.Toggle ("Generate Lightmapping UVs", _target.generateLightmappingUVs);
  21.        
  22.         if (!_target.isCombined) {
  23.             if (GUILayout.Button ("Combine now (May take a while!)")) {
  24.                 _target.Combine();
  25.                
  26.                 if (_target.generateLightmappingUVs) {
  27.                     GenerateLightmappingUVs();
  28.                 }
  29.             }
  30.         }
  31.        
  32.         if (_target.isCombined) {
  33.             if (GUILayout.Button ("Generate Lightmap UVs")) {
  34.                 GenerateLightmappingUVs();
  35.             }
  36.            
  37.             if (GUILayout.Button ("Split Mesh")) {
  38.                 DestroyImmediate(_target.GetComponent (typeof(MeshFilter)));
  39.                 DestroyImmediate(_target.GetComponent (typeof(MeshRenderer)));
  40.                
  41.                 foreach (MeshRenderer mr in _target.GetComponentsInChildren(typeof(MeshRenderer))) {
  42.                     mr.enabled = true;
  43.                 }
  44.                
  45.                 _target.isCombined = false;
  46.             }
  47.         }
  48.     }
  49.    
  50.    
  51.    
  52.    
  53.     void GenerateLightmappingUVs() {
  54.         MeshFilter mf = _target.GetComponent(typeof(MeshFilter)) as MeshFilter;
  55.        
  56.         // make null check because if not enough meshes are present no combined mesh would have been created!
  57.         if (mf != null) {
  58.         }
  59.     }
  60.    
  61. }

Note: While the script still gives you the opportunity to use it with meshes with multiple materials (which will effectively generate multiple new gameObjects), this is not supported in this version, you might get errors. If you need that, feel free to build that yourself or let me know, shouldn't be hard to add.

반응형
Posted by blueasa
, |

작업하던 도중 모바일에선 경로가 파일경로가 바뀌고 읽어오지못하는 문제가 발생하였다.

pc에선 잘되지만 모바일에서만 이상이있었음

찾다 찾다 유니티 포럼에서 좋은거 긁어왔습니다. ㅋㅋ 아이폰도 됩니다~

 

 

1 public void writeStringToFile( string str, string filename ) 2 { 3 #if !WEB_BUILD 4 string path = pathForDocumentsFile( filename ); 5 FileStream file = new FileStream (path, FileMode.Create, FileAccess.Write); 6 7 StreamWriter sw = new StreamWriter( file ); 8 sw.WriteLine( str ); 9 10 sw.Close(); 11 file.Close(); 12 #endif 13 }


1 public string readStringFromFile( string filename)//, int lineIndex ) 2 { 3 #if !WEB_BUILD 4 string path = pathForDocumentsFile( filename ); 5 6 if (File.Exists(path)) 7 { 8 FileStream file = new FileStream (path, FileMode.Open, FileAccess.Read); 9 StreamReader sr = new StreamReader( file ); 10 11 string str = null; 12 str = sr.ReadLine (); 13 14 sr.Close(); 15 file.Close(); 16 17 return str; 18 } 19 else 20 { 21 return null; 22 } 23 #else 24 return null; 25 #endif 26 }

// 파일쓰고 읽는넘보다 이놈이 핵심이죠
1 public string pathForDocumentsFile( string filename ) 2 { 3 if (Application.platform == RuntimePlatform.IPhonePlayer) 4 { 5 string path = Application.dataPath.Substring( 0, Application.dataPath.Length - 5 ); 6 path = path.Substring( 0, path.LastIndexOf( '/' ) ); 7 return Path.Combine( Path.Combine( path, "Documents" ), filename ); 8 } 9 else if(Application.platform == RuntimePlatform.Android) 10 { 11 string path = Application.persistentDataPath; 12 path = path.Substring(0, path.LastIndexOf( '/' ) ); 13 return Path.Combine (path, filename); 14 } 15 else 16 { 17 string path = Application.dataPath; 18 path = path.Substring(0, path.LastIndexOf( '/' ) ); 19 return Path.Combine (path, filename); 20 } 21 }



[출처] Unity3D 모바일(안드로이드) 파일생성 및 읽고 쓰기|작성자 호랑낚시

반응형
Posted by blueasa
, |

Camera.WorldPositionToViewportPoint() 라는 함수를 사용합니다.


오늘 레퍼런스[2016-04-01] 확인해보니 유니티가 업데이트 되면서 함수명이 조금 바꼈네요.

Camera.WorldToViewportPoint() 입니다.


리턴되는 Vector3의 x, y 좌표가 [0~1] 범위 안에 있고, z좌표가 0보다 크면 보이는 겁니다. ^^



참조 : http://docs.unity3d.com/ScriptReference/Camera.WorldToViewportPoint.html


출처 : http://drago7.tistory.com/entry/Unity3D%EC%97%90%EC%84%9C-%EC%98%A4%EB%B8%8C%EC%A0%9D%ED%8A%B8%EA%B0%80-%EC%B9%B4%EB%A9%94%EB%9D%BC-%EB%B7%B0%ED%8F%AC%ED%8A%B8%EC%97%90-%EB%93%A4%EC%96%B4%EC%98%A4%EB%8A%94%EC%A7%80-%EC%B4%88%EA%B0%84%EB%8B%A8-%EC%B2%B4%ED%81%AC

반응형
Posted by blueasa
, |

링크 : http://hompy.info/664



CoverFlowScroll.unitypackage



요즘 제작중인 RPG 게임 GUI 에서 영웅 생성을 위해 캐릭터를 선택하는 UI 를 커버플로우(Cover Flow)로 구성하게 되어 NGUI 를 조금 응용해서 심플하게 구성해봤습니다. 아래 동영상과 유니티 데모를 보시면 대략 어떤 것인지 아실 수 있을 것이며 혹시나 구현 방법에 대해 관심 있는 분들은 첨부 파일을 받아서 패키지 임포트로 유니티에서 가져가 내용을 살펴 보시면 되겠습니다. NGUI 외에도 트위닝 모션을 위해 HOTween 플러그인을 사용하는 코드가 있으나 수정해서 쓰셔도 되겠습니다. 그리고 데모에 보이는 캐릭터 디자인 소스는 에셋 스토어에서 구입한 것이네요. NGUI 플러그인에 이런 기능도 포함되면 좋을 것 같은데 안된다면 아쉽지만 저처럼 이렇게 구현해야 되겠지요.^^ 여러분은 지금 어떤 기능들을 추가해보고 있나요?

[유니티 데모 링크] http://www.hompydesign.com/tmp/coverflow/

[패키지 첨부파일]  CoverFlowScroll.unitypackage

using UnityEngine;
using System.Collections;
using System.Collections.Generic;
using Holoville.HOTween;
using Holoville.HOTween.Plugins;

public class HeroTable : MonoBehaviour {
   UISprite[] heros;

   Transform mTrans;
   bool mIsDragging = false;
   Vector3 mPosition, mLocalPosition;
   Vector3 mDragStartPosition;
   Vector3 mDragPosition;
   Vector3 mStartPosition;
   
   public float cellWidth = 160f;
   public float downScale = 0.4f;
   public int cellTotal = 6;
   public int seq = 3;
   
   public UILabel titleLabel;
   
   // Use this for initialization
   void Start () {
       StartCoroutine( DelayStart(1f) );
   }
   void Awake(){
       mTrans = transform;
       mPosition = mTrans.position;
       mLocalPosition = mTrans.localPosition;
   }
   
   IEnumerator DelayStart(float delayTime) {
       yield return new WaitForSeconds(delayTime);
       heros = gameObject.GetComponentsInChildren<UISprite>();
       SetPosition(false);
   }
   
   void SetSequence(bool isRight){
       Vector3 dist = mLocalPosition - mTrans.localPosition;
       float distX = Mathf.Round(dist.x/cellWidth);
       seq = (int)distX;
       if (seq >= cellTotal) seq = cellTotal - 1;
       if (seq <= 0) seq = 0;
   }
   
   void SetPosition(bool isMotion){
       Vector3 pos = mLocalPosition;
       pos -= new Vector3(seq * cellWidth, 0f0f);
       if (isMotion) {
           TweenParms parms = new TweenParms();
           parms.Prop("localPosition", pos);
           parms.Ease(EaseType.Linear);
           HOTween.To(mTrans, 0.1f, parms);
           HOTween.Play();
       else {
           mTrans.localPosition = pos;
       }
       titleLabel.text = heros[seq].spriteName;
   }

   void Drop () {
       Vector3 dist = mDragPosition - mDragStartPosition;
       if (dist.x>0f) SetSequence(true);
       else SetSequence(false);
       SetPosition(true);
   }

   void OnDrag (Vector2 delta) {
       Ray ray = UICamera.currentCamera.ScreenPointToRay(UICamera.lastTouchPosition);
       float dist = 0f;
       Vector3 currentPos = ray.GetPoint(dist);

       if (UICamera.currentTouchID == -|| UICamera.currentTouchID == 0) {
           if (!mIsDragging) {
               mIsDragging = true;
               mDragPosition = currentPos;
           else {
               Vector3 pos = mStartPosition - (mDragStartPosition - currentPos);
               Vector3 cpos = new Vector3(pos.x, mTrans.position.y, mTrans.position.z);
               mTrans.position = cpos;
           }
       }
   }

   void OnPress (bool isPressed) {
       mIsDragging = false;
       Collider col = collider;
       if (col != null) {
           Ray ray = UICamera.currentCamera.ScreenPointToRay(UICamera.lastTouchPosition);
           float dist = 0f;
           mDragStartPosition = ray.GetPoint(dist);
           mStartPosition = mTrans.position;
           col.enabled = !isPressed;
       }
       if (!isPressed) Drop();
   }
}

using UnityEngine;
using System.Collections;

public class HeroItem : MonoBehaviour {
   Transform mTrans, mParent;
   Vector3 scale;
   float cellWidth;
   float downScale;
   HeroTable hTable;

   void Start () {
       mTrans = transform;
       scale = mTrans.localScale;
       mParent = mTrans.parent;
       hTable = mParent.GetComponent<HeroTable>();
       cellWidth = hTable.cellWidth;
       downScale = hTable.downScale;
   }
   
   void Update () {
       Vector3 pos = mTrans.localPosition + mParent.localPosition;
       float dist = Mathf.Clamp(Mathf.Abs(pos.x), 0f, cellWidth);
       mTrans.localScale = ((cellWidth - dist*downScale) / cellWidth) * scale;
   }
}

반응형
Posted by blueasa
, |

링크 : http://www.stevetrefethen.com/highlighter/default.aspx


반응형
Posted by blueasa
, |

3D Model Viewer

Unity3D/Utility / 2013. 1. 18. 12:50

링크 : http://www.youtube.com/watch?annotation_id=annotation_250755&feature=iv&src_vid=yySljuVOBg8&v=6fjgxhmLteQ








Dropbox link:http://dl.dropbox.com/u/19470409/Unity/Model%20Viewer%20Orbit.rar


This is a tutorial how to use this simple model Viewer.

For new model:
You just import your FBX file attach the Model_Animations.cs script and re-enter the animations and make a Prefab of it.
The just Add It at the SpawnPoint prefab. Like i show in the video.


반응형
Posted by blueasa
, |

Unity3D Tools

Unity3D/Utility / 2013. 1. 18. 12:22

Unity3D Tools

Unity3D GUI & 2D Sprite Tools
http://danim.tv/blog/archives/unity3d-gui-2d-sprite-tools

Unity3D Level Editor
http://danim.tv/blog/archives/unity3d-level-editor

Unity3D Game Mechanics & AI Tools
http://danim.tv/blog/archives/unity3d-game-mechanics-ai-tools/

Unity3D Input Tools
http://danim.tv/blog/archives/unity3d-input-tools

Doc Search
http://www.lemodev.com/products/doc-search.php
http://u3d.as/content/lemo-dev/doc-search/34w

UnIDE
http://unityide.com
https://www.assetstore.unity3d.com/#/content/6070

Script Inspector
http://forum.unity3d.com/threads/138329
https://www.assetstore.unity3d.com/#/content/3535

Favorites Tabs
http://forum.unity3d.com/threads/149856
https://www.assetstore.unity3d.com/#/content/4237

iTween
http://www.pixelplacement.com/iTween/

iTween Visual path editor
http://pixelplacement.com/2010/12/03/visual-editor-for-itween-motion-paths/

iTween Visual Editor
http://dkoontz.wordpress.com/2010/10/27/itween-visual-editor/

HOTween + HOTween Visual Editor – fast & robust tween engine, type-safe object-oriented
http://www.holoville.com/hotween
http://forum.unity3d.com/threads/118515
http://code.google.com/p/hotween/

Pool Manager
http://poolmanager.path-o-logical.com
http://u3d.as/content/path-o-logical-games-llc/pool-manager/1Z4

Object Pooling Class
http://unity.clockstone.com/assetStore-objectPoolingClass.html

Playmaker – visual scripting tool
http://hutonggames.com/playmaker.html
http://forum.unity3d.com/threads/72349

Antares Project
http://forum.unity3d.com/viewtopic.php?t=50843

uScript Visual Scripting Tool
http://forum.unity3d.com/threads/84594

Brain Builder
http://boldai.com

Unity 3 Node Based Shader Editor
http://forum.unity3d.com/viewtopic.php?t=60174

SceneMate – toolbar to increase workflow speed
http://u3d.as/content/tim-wiese/scene-mate/3JY

PlayModePersist
https://www.assetstore.unity3d.com/#/content/188

Shortcuts Editor
http://forum.unity3d.com/viewtopic.php?t=64494

Edit multiple gameobjects
http://forum.unity3d.com/threads/68102

Game Translator – by the Google Translate API
http://forum.unity3d.com/threads/81538

Translation Editor
http://forum.unity3d.com/threads/85129

Unity Localization Framework (ULF) for Language localization
http://www.bitwisedesign.com/unity/localization
http://forum.unity3d.com/threads/53481

Font Texture Builder + Unity Importer
http://rouheegames.com/FTB/

RapidUnity Light Library
http://www.alabsoft.com/lightlib.shtml
http://forum.unity3d.com/threads/56255

RapidUnity Array Wizard
http://www.alabsoft.com/arraywiz.shtml
http://forum.unity3d.com/threads/59935

Array based Object Placement Tool (Editor Extension)
http://forum.unity3d.com/threads/84902

TransformUtilities
http://www.blog.silentkraken.com/2010/02/06/transformutilities/

FMODUnity .NET Plugin
http://www.squaretangle.com/FMODUnity.html
http://forum.unity3d.com/threads/28548

UniLOD – Level-of-detail and streaming support
http://forum.unity3d.com/viewtopic.php?t=45295

FaceFX – Facial animation integration
http://forum.unity3d.com/threads/63573
http://www.facefx.com/page/unity-demo

UnitySteer
http://www.arges-systems.com/articles/48/unitysteer-20-released

uniSWF – Convert Adobe Flash to Unity3D UI Solution
http://uniswf.com

Convert Unity Javascript (unityscript) to C#
http://www.m2h.nl/files/js_to_c.php

Convert C# to Boo
http://codeconverter.sharpdevelop.net/SnippetConverter.aspx

LibNoise ported to Unity (Perlin, RiggedMultifractal, Voronoi, Billow Noises)
http://forum.unity3d.com/threads/68764

Griddy – Unity Grid Toolkit
http://forum.unity3d.com/threads/50108

Nimbus – Cloud System
http://happyface3d.com

RageSpline – Create smooth 2D graphics inside Unity Editor
http://forum.unity3d.com/threads/86772

Mega-fiers modifiers – 3D Mesh Modifier System
http://west-racing.com/mega-fiers/

Game Draw 3D modeling
http://gamedraw3d.com

SmartFoxServer: massive multiplayer server for MMO
http://www.smartfoxserver.com

Exit Games – Game Network Engines, MMO Server
http://www.exitgames.com

ElectroServer5 – For client-server games Flash, Unity3D, iPhone/iPad, and Android
http://www.electrotank.com

Irc Chat
http://forum.unity3d.com/threads/68070

Vehicle Editor Resource Pack
http://www.alabsoft.com/rapidunity.shtml

EasyRoads3D – Road Systems for Unity
http://unityterraintools.com
http://forum.unity3d.com/viewtopic.php?t=23519

Road/Path Tool – River Tool – Terrain Toolkit
http://www.sixtimesnothing.com/tools-and-resources/

Road Network Generator
http://forum.unity3d.com/threads/83961
http://dl.dropbox.com/u/18986451/GrantSimpleSoftware/roadNetworkGenerator.html

Terrain 4 Mobile System
http://www.store.azert2k.fr/?page_id=244

Unity3D Obfuscator – a special protection tool
http://en.unity3d.netobf.com
http://forum.unity3d.com/threads/51356

Stitchscape – ObjReader – UniFileBrowser – Fractscape
http://www.starscenesoftware.com/Utilities.html

Vectrosity (Line, Circle, Ellipse, Grid & Selection)
http://starscenesoftware.com/vectrosity.html
http://forum.unity3d.com/viewtopic.php?t=53268

Audio Toolkit
http://unity.clockstone.com
https://www.assetstore.unity3d.com/#/content/2647
Audio Toolkit Free
https://www.assetstore.unity3d.com/#/content/2679

Master Audio
https://www.assetstore.unity3d.com/#/content/5607

Mixamo – Animation Driven Playable Character
http://www.mixamo.com

faceAPI
http://www.andysaia.com/radicalpropositions/?p=197

Text to Speech [Dll] for Win32
http://forum.unity3d.com/viewtopic.php?t=60020

M2HCulling: Optimize your game – culling system for Unity
http://forum.unity3d.com/viewtopic.php?t=55686

UnityDevs Tools (Cubemaps Generator – Automatic progress bars load)
http://unitydevs.com

3D Anaglyph System
http://www.store.azert2k.fr

Stereoskopix3D
http://forum.unity3d.com/threads/63874-stereo-3D-in-Unity-3D?p=416458#post416458

Browsing the web within Unity Editor
http://forum.unity3d.com/threads/67149

Berkelium plugin: rendering interactive websites
http://github.com/jdierckx/UnityBerkeliumPlugin
http://forum.unity3d.com/viewtopic.php?t=57298

HtmlTexturePlugin
http://www.unifycommunity.com/wiki/index.php?title=HtmlTexturePlugin

UnityAr ArToolkit Webcam
http://produktion.weltenbauer.com/#/5
http://forum.unity3d.com/viewtopic.php?t=32669

Unity Automatic PDF Gereration with Sharp PDF
http://www.francescogallorini.com/2011/02/unity-sharp-pdf
http://forum.unity3d.com/threads/78108-Runtime-PDF-Gereration

Unity 3 Tree Creation and Editing Video
http://hometime.net/tree edit/tree edit.html
http://forum.unity3d.com/viewtopic.php?t=60094

Runtime obj importer
http://forum.unity3d.com/viewtopic.php?t=45990

M2HPatcher – Patch/update your games
http://forum.unity3d.com/threads/62326-M2HPatcher

Unity 3D Save Tool
http://bladestudios.x10hosting.com/u3dst.html

EZ Replay Manager
http://www.softrare.eu/ez-replay-manager-demo-1.html
http://u3d.as/content/soft-rare/ez-replay-manager

ColdScene – SceneXML
http://forum.unity3d.com/threads/68080

Unity 3 iPhone Plugins
http://www.prime31.com/unity/

Unity3dx
http://www.unity3dx.com

UniTool – Advanced Unity embedding and Flash Interfacing
http://code.google.com/p/unitool
http://forum.unity3d.com/threads/70550

Unity WordPress Blog Plugin

http://unity3d.com/support/resources/assets/unity-wordpress-blog-plugin

Unity WordPress Plugin with Duplicates Fix
http://forum.unity3d.com/threads/38181
http://pennymo.com/2009/09/04/putting-unity-3d-into-wordpress-a-nice-solution

Unity 3.4 unsupported 64-bit Windows web player
http://blogs.unity3d.com/2011/07/28/unity-3-4-web-player-for-64-bit-windows



Read more: http://danim.tv/blog/archives/unity3d-tools/#ixzz2IIH4Xnda

반응형
Posted by blueasa
, |

At first, sorry for my english. My teachers were Japanese
:lol:

As it is known, combining of the objects using one material in one mesh, strongly raises productivity. For this purpose in Standard Assets Unity there is script Combine Children (further: the Combine)
In the course of my work, some additives to a standard script of the Combine were created. And I share it:



[V] Frame To Wait: how many frames on script start to wait before to make combining.
For example, you have an object containing one hundred more other objects which too contain childs. Prefab of internal objects, it is equipped by the Combine with own customisations. On start, all of them will be combined and we will receive less meshes, but all the same a heap. Why not to Combine them again?
We put "1" in this setting and in a following frame, after end childs is combined, we stick together new received meshes again and it is received 5 - 10 meshes instead of old hundreds.
[V] Combine On Start - the script will work on composition start (if it is activated, sure).
[V] Destroy After Optimized - to kill all initial objects. Cautiously! If on these objects have colliders, they too are deleted.
[V] Cast Shadow - created mesh will cast shadow.
[V] Receive Shadow - created mesh will accept shadow.
[V] Keep Layer - the created object will save the same layer, as for the initial object (on which the script is)



Well and, a bonus!
[V] Under the right button there lives Combine Now command. That allows to spend all combination directly in the Editor, to estimate changes and, or to cancel them, or to save in the Scene. That is - to avoid necessity combining on application start.




combinechildren_962.cs



출처 : http://forum.unity3d.com/threads/37721-Combine-Children-Extented-(sources-to-share)

반응형

'Unity3D > Extensions' 카테고리의 다른 글

ObjectPool  (0) 2014.04.22
인스펙터 상의 GUI를 비활성화 시키고 싶을 때..  (0) 2014.04.02
Save Scene while on play mode  (0) 2014.01.12
Auto-Save Scene on Run  (0) 2014.01.12
SpriteManager  (0) 2012.11.24
Posted by blueasa
, |