반응형
반응형
반응형

유니티3D로 게임을 개발하다 보면 어셋 스토어에서 구입하거나 무료 버전을 다운 받아서 사용하게 된다. 
어셋이 설치되는 기본 폴더에 놓고 사용하면 상관없지만, 다른 폴더에 이것 저것 모아 놓고 사용하다 보면 어디에 뭐가 있는지?
현재 가지고 있는 버전이 최신 버전인지 등이 궁금할 때가 있다. 

이럴 경우 필요한 툴이 빨리 찾아주고 버전 갱신을 알아서 해주는 툴이 있으면 했다.
바로 이툴이 한눈에 리스트를 보여주고 해당 어셋들의 버전이 업그래이드가 필요한지,용량을 서로 비교해주는 기능이 있다. 필터 기능이 있어 원하는 어셋을 찾아주기도 한다. 

기본 유니티 툴을 이용해 할 수도 있지만 별도 폴더에서 업데이트 유무나 용량 체크 그리고 클릭시 바로 해당 에셋스토어로 가 주는 정도의 기능이 들어 있어 좋은듯싶다. 

중복된 어셋도 한눈에 확인이 된다. 몇몇 아쉬운 기능들이 존재하지만... 



개발자에게 몇몇 기능을 다음 버전에 개선해달라고 요청을 해두었고, 답신도 받은 상태라 조만간 기능 개선된 버전을 제공하지 않을까 싶다. 

반응형
반응형

공식홈페이지 링크



AddComponentMenu : 유니티 메뉴 추가.

// C# example:
[AddComponentMenu("Transform/Follow Transform")]
public class FollowTransform : MonoBehaviour
{
}


ContextMenu : 우클릭 메뉴 추가.

// C# example:
public class ContextTesting : MonoBehaviour {
    /// Add a context menu named "Do Something" in the inspector
    /// of the attached script.
    [ContextMenu ("Do Something")]
    void DoSomething () {
        Debug.Log ("Perform operation");
    }
}


ExecuteInEditMode : 에디트 모드에서 스크립트 실행.

using UnityEngine;
using System.Collections;

[ExecuteInEditMode]
public class example : MonoBehaviour {
    public Transform target;
    void Update() {
        if (target)
            transform.LookAt(target);
        
    }
}


HideInInspector : 인스펙터에서 속성 감추기, 이전 세팅값은 유지.

using UnityEngine;
using System.Collections;

public class example : MonoBehaviour {
    [HideInInspector]
    public int p = 5;
}


NonSerialized : 인스펙터에서 속성 감추기, 이전 세팅값은 무시.

// C# Example
class Test {
    // p will not be shown in the inspector or serialized
    [System.NonSerialized]
    public int p = 5;
}


RPC : 원격지 호출 함수로 지정, 보내는 쪽과 받는 쪽 모두 다 존재해야 함.

using UnityEngine;
using System.Collections;

public class example : MonoBehaviour {
    public Transform cubePrefab;
    void OnGUI() {
        if (GUILayout.Button("SpawnBox")) {
            NetworkViewID viewID = Network.AllocateViewID();
            networkView.RPC("SpawnBox", RPCMode.AllBuffered, viewID, transform.position);
        }
    }
    [RPC]
    void SpawnBox(NetworkViewID viewID, Vector3 location) {
        Transform clone;
        clone = Instantiate(cubePrefab, location, Quaternion.identity) as Transform as Transform;
        NetworkView nView;
        nView = clone.GetComponent<NetworkView>();
        nView.viewID = viewID;
    }
}


RequireComponent : 컴포넌트 자동 추가.

[RequireComponent (typeof (Rigidbody))]
public class PlayerScript : MonoBehaviour {
    void FixedUpdate()  {
        rigidbody.AddForce(Vector3.up);
    }
}


Serializable : 인스펙터에 인스턴스의 하위 속성 노출.

// C# Example
[System.Serializable]
class Test
{
    public int p = 5;
    public Color c = Color.white;
}

class Sample : MonoBehaviour 
{
    public Test serializableObj; // 인스펙터에 p, c가 노출된다.
}


SerializeField : 인스펙터에 비공개 멤버 노출.

//C# example
using UnityEngine;

public class SomePerson : MonoBehaviour {
    //This field gets serialized because it is public.
    public string name = "John";

    //This field does not get serialized because it is private.
    private int age = 40;

    //This field gets serialized even though it is private
    //because it has the SerializeField attribute applied.
    [SerializeField]
    private bool hasHealthPotion = true;

    void Update () {
    }
}

출처 : http://www.uzoo.in/index.php?mid=master_codesnippet&order_type=desc&document_srl=531&listStyle=viewer#

반응형

+ Recent posts