유니티 C# 플랫폼 분기별 코드 작성하기 Platform 간단 사용법


유니티 C# 플랫폼 분기별 코드 작성하기 Platform 간단 사용법

코드 작성 using System.Collections; using System.Collections.Generic; using UnityEngine; public class Example : MonoBehaviour { void Start() { #if UNITY_EDITOR Debug.Log("유니티 에디터에서 실행"); #elif UNITY_ANDROID Debug.Log("안드로이드에서 실행"); #elif UNITY_IOS Debug.Log("아이폰에서 실행"); #elif UNITY_WEBGL Debug.Log("웹에서 실행"); #endif } } 다른 방법 using System.Collections; using System.Collections.Generic; using UnityEngi..


원문링크 : 유니티 C# 플랫폼 분기별 코드 작성하기 Platform 간단 사용법