[펌] 유니티3D Conditional Attribute 사용

|

출처 : http://lab.gamecodi.com/board/zboard.php?id=GAMECODILAB_Lecture&page=1&sn1=&divpage=1&sn=on&ss=on&sc=on&keyword=%C0%AF%B4%CF%C6%BC&select_arrange=last_comment&desc=desc&no=315



·미리보기 | 소스복사·
  1. using ConditionalAttribute = System.Diagnostics.ConditionalAttribute;  
·미리보기 | 소스복사·
  1. using UnityEngine;  
  2. using System.Collections;  
  3.   
  4. using ConditionalAttribute = System.Diagnostics.ConditionalAttribute;  
  5.   
  6. public class NewBehaviourScript : MonoBehaviour {  
  7.   
  8.     // Use this for initialization  
  9.     void Start () {  
  10.       
  11.     }  
  12.       
  13.     // Update is called once per frame  
  14.     void Update () {  
  15.         call0 ();  
  16.         call1 ();  
  17.         call2 ();     
  18.     }  
  19.       
  20.     void call0()  
  21.     {  
  22.         Debug.Log("call0");  
  23.     }     
  24.       
  25.     [Conditional("CON1")]  
  26.     void call1()  
  27.     {  
  28.         Debug.Log("call1");  
  29.     }  
  30.       
  31.     [Conditional("CON2")]  
  32.     void call2()  
  33.     {  
  34.         Debug.Log("call2");  
  35.     }     
  36. }  


Trackback 0 And Comment 0