2015년 3월 24일 화요일

2015.03.25 전라북도게임아카데미 Data Size 알아보기

using UnityEngine;
using System.Collections;

public class CsDataSize : MonoBehaviour {
 
    // Use this for initialization
    void Start()
    {
   
        Debug.Log("Size of byte:   " + sizeof(byte));
        Debug.Log("Size of short:  " + sizeof(short));
        Debug.Log("Size of int:    " + sizeof(int));
        Debug.Log("Size of long:   " + sizeof(long));
        Debug.Log("Size of double: " + sizeof(double));
        Debug.Log("Size of float:  " + sizeof(float));


    }

    // Update is called once per frame
    void Update()
    {

    }
}


sizeof() 를 이용하자. 

댓글 없음:

댓글 쓰기