Quantcast
Channel: Questions in topic: "dll"
Viewing all articles
Browse latest Browse all 706

Include platform defines in dll

$
0
0
I've been trying move some of my c# code into a dll reduce compile time and so I can create a custom Debug output tool (since putting the code in the dll will allow to click on the log and take you to the line of code that generated the log) . I've placed unity defines inside the code but I have noticed that any code placed inside the defines are ignored, even if I am on the correct platform. I've attached code which I've compiled into a dll which displays this issue. Does anyone have a solution to this problem or is this a limitation of using .dlls? using System; using UnityEngine; namespace UnityDefineTest { public class DefineTest:MonoBehaviour { private string outputText = string.Empty; private void Start() { #if UNITY_EDITOR outputText += "Unity editor "; #endif #if UNITY_WEBPLAYER outputText += "Unity webplayer "; #endif #if UNITY_STANDALONE outputText += "Unity standalone "; #endif outputText += "default text"; } private void OnGUI() { GUILayout.Label(outputText); } } }

Viewing all articles
Browse latest Browse all 706

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>