사용자 도구

사이트 도구


language:unity:2-스크립트-레퍼런스

차이

문서의 선택한 두 판 사이의 차이를 보여줍니다.

차이 보기로 링크

양쪽 이전 판이전 판
language:unity:2-스크립트-레퍼런스 [2014/01/07 14:53] – [Wiki Unity3D] kieunslanguage:unity:2-스크립트-레퍼런스 [2024/04/23 22:44] (현재) – 바깥 편집 127.0.0.1
줄 1: 줄 1:
 +
 +====== Unity3D 특화 CSharp 팁 ======
 +
 +[[language:csharp:unity3d|유니티3D에 특화되는 C# 코드 팁은 여기]]
 +
 +
 +====== define ======
 +
 +상세한 것은 [[http://docs.unity3d.com/Documentation/Manual/PlatformDependentCompilation.html|여기(Platform Dependent Compilation)]]
 +
 +^ 구동 환경                                                               ^^
 +| UNITY_EDITOR           | 에디터에서 실행하는 경우                        |
 +| UNITY_STANDALONE_OSX   | OSX에서 구동하는 경우                           |
 +| UNITY_STANDALONE_WIN   | 윈도우즈에서 구동하는 경우                      |
 +| UNITY_STANDALONE_LINUX | 리눅스                                          |
 +| UNITY_STANDALONE       | osx, linux, win                                 |
 +| UNITY_WEBPLAYER        | 웹                                              |
 +| UNITY_IPHONE           | 아이폰                                          |
 +| UNITY_ANDROID          | 안드폰                                          |
 +| UNITY_FLASH            | 플래시                                          |
 +^ 유니티 버젼                                                             ^^
 +| UNITY_4_1              | Platform define for major version of Unity 4.1. |
 +
 +====== Application ======
 +
 +Application의 런타임 정보를 들고 있는 클래스
 +
 +===== Application.dataPath =====
 +
 +게임 데이터 폴더를 가리킨다.
 +
 +| UnityEditor | <Path to Project Folder>/Assets |
 +| Mac | <Path to Player App Bundle>/Contents |
 +| iPhone | <path to player app bundle>/<AppName.app>/Data |
 +| Win | <path to executablename_Data folder>/ |
 +| Web/Flash | 플레이어가 구동되는 URL에 해당되는 폴더 |
 +
 +<code>
 +print (Application.dataPath);
 +</code>
 +====== Rigidbody ======
 +  * (float) Ridigbody.angularDrag : \\ 오브젝트의 회전 속도를 떨어뜨린다. \\ [[http://docs.unity3d.com/Documentation/ScriptReference/Rigidbody-angularDrag.html|Ridigbody.angularDrag]]
 +  * (float) Rigidbody.drag : \\ 오브젝트가 움직이는 속도를 떨어뜨린다. 숫자가 클수록 빠르게 멈춘다. \\ [[http://docs.unity3d.com/Documentation/ScriptReference/Rigidbody-drag.html|Rigidbody.drag]]
 +
 +====== Mathf ======
 +  = float clamp01( float ) : 0 ~ 1 사이의 값을 리턴
 +  = float Lerp( float f, float t, float by ) : f 에서 t 사이의 값을 by 값에 의해 설정한다. by가 0이면 f값을 리턴하고, by가 1이면 t값을 리턴. by가 0.5면 f와 t사의 중간값을 리턴.
 +  = bool Approximately( float a, float b ) : a와 b가 같은 값인지 비교한다. 정수가 아닌 float는 소수점에 의해 비교 결과가 달라질 수 있기 때문에.
 +  
 +====== Screen ======
 +
 +<code csharp>
 +Screen.lockCursor = true; // 커서를 없애버린다.
 +</code>
 +
 +====== Wiki Unity3D ======
 +
 +wiki.unity3d
 +
 +  * [[http://wiki.unity3d.com/index.php/Bresenham3D|Bresenham3D]]
 +  * FingerManager
 +  * [[http://wiki.unity3d.com/index.php/Interpolate|Interpolate]]
 +  * [[http://wiki.unity3d.com/index.php/IPhoneDeviceModel|IPhoneDeviceModel]]
 +  * [[http://wiki.unity3d.com/index.php/KeyboardEventManager|KeyboardEventManager]]
 +  * [[http://wiki.unity3d.com/index.php/Mathfx|Mathfx]]
 +  * [[http://wiki.unity3d.com/index.php/Matrix|Matrix]]
 +  * [[http://wiki.unity3d.com/index.php/MeshSubdivision|MeshSubdivision]]
 +  * [[http://wiki.unity3d.com/index.php/Startup_Manager|Startup Manager]]
 +
 +  * [[http://wiki.unity3d.com/index.php/SphericalCoordinates|SphericalCoordinates]]
 +
 +  * [[http://wiki.unity3d.com/index.php/TextureFloodFill|TextureFloodFill]]
 +  * [[http://wiki.unity3d.com/index.php/TextureDrawCircle|TextureDrawCircle]]
 +  * [[http://wiki.unity3d.com/index.php/TextureDrawLine|TextureDrawLine]]
 +  * [[http://wiki.unity3d.com/index.php/TextureUtils|TextureUtils]]
 +
 +  * [[http://wiki.unity3d.com/index.php/Triangulator|Triangulator]]
 +  * [[http://wiki.unity3d.com/index.php/UnitSphere|UnitSphere]]
 +  * [[http://www.arongranberg.com/unity/unitypaint/|unityPaint]]
 +
 +  * [[http://wiki.unity3d.com/index.php/UVTransfer|UVTransfer]] : (*)
 +  * [[http://wiki.unity3d.com/index.php/WeightedRandomizer|WeightedRandomizer]]
 +
 +  * MeshCreationGrid
 +  * MeshCreationHelper
 +  * MeshHelper
 +  * MetaMorph(*)
 +
 +  * [[http://wiki.unity3d.com/index.php/TransformRotation2D|TransformRotation2D]]
 +
 +  * [[http://wiki.unity3d.com/index.php/3d_Math_functions|3d Math functions]]
 +  * [[http://wiki.unity3d.com/index.php/ScaleTransform|ScaleTransform]] : ( getBound 와 같은 함수가 있다 )
 +
 +에디터
 +
 +  * [[http://wiki.unity3d.com/index.php/CurveEditorTools|CurveEditorTools]]
 +  * [[http://wiki.unity3d.com/index.php/FixBlenderImportRotation|FixBlenderImportRotation]]
 +  * [[http://wiki.unity3d.com/index.php/Notes|Notes]]
 +  * [[http://wiki.unity3d.com/index.php/PolyLineEditor|PolyLineEditor]]
 +
 +?
 +  * [[http://wiki.unity3d.com/index.php/WorldUVs|WorldUVs]]
 +  * [[http://wiki.unity3d.com/index.php/TransformUtilities|TransformUtilities]]
 +  * http://wiki.unity3d.com/index.php/EditorGraphWindow
 +  * http://wiki.unity3d.com/index.php/GLDraw
 +
 +컨트롤
 +
 +  * Click To Move C#
 +  * DoubleJumpController
 +  * KeyCombo
 +  * [[http://wiki.unity3d.com/index.php/WaypointMaster|WaypointMaster]]
 +
 +effects
 +
 +  * http://wiki.unity3d.com/index.php/VectorLine
 +  * http://wiki.unity3d.com/index.php/Spline_Controller
 +  * http://wiki.unity3d.com/index.php/SoftBodies
 +  * http://wiki.unity3d.com/index.php/Perlin_Noise
 +  * http://wiki.unity3d.com/index.php/RenderTexture_Free
 +  * http://wiki.unity3d.com/index.php/Scrolling_UVs
 +  * http://wiki.unity3d.com/index.php/Particle_Spiral_Effect(*)
 +
 +physics
 +
 +  * http://wiki.unity3d.com/index.php/Simple_planetary_orbits
 +  * http://wiki.unity3d.com/index.php/Trajectory_Simulation
 +  * http://wiki.unity3d.com/index.php/GPS_Global_Positioning_System
 +  * http://wiki.unity3d.com/index.php/Gravity
 +
 +network
 +
 +  * WebAsync 
 +
 +Shader
 +
 +  * http://wiki.unity3d.com/index.php/SimpleAdditive
 +  * http://wiki.unity3d.com/index.php/VertexColorUnlit
 +  * http://wiki.unity3d.com/index.php/OutlinedDiffuse
 +  * http://wiki.unity3d.com/index.php/Outlined_Diffuse_3
 +  * http://wiki.unity3d.com/index.php/TextureMask
 +  * http://wiki.unity3d.com/index.php/Blend_2_Textures
 +  * http://wiki.unity3d.com/index.php/Simply_Lit
 +  * http://wiki.unity3d.com/index.php/Texture_Only
 +  * http://wiki.unity3d.com/index.php/Lighted_Bumped_Outline
 +  * http://wiki.unity3d.com/index.php/Silhouette-Outlined_Diffuse
 +
 +?
 +  * http://wiki.unity3d.com/index.php/Transparent_Cutout_Soft_Edge_Unlit_Texture_Blend
 +  * http://wiki.unity3d.com/index.php/SurfaceReflection
 +  * http://forum.unity3d.com/threads/186071-Outline-shader-2D
 +  * http://wiki.unity3d.com/index.php/AlphaSelfIllum