Quantcast
Channel: Questions in topic: "namespace"
Viewing all articles
Browse latest Browse all 398

How to only use namespace if it exists?

$
0
0
Hi there, I'm trying to make an asset. This is a script I want to make compatible for both TextMeshPro users, and people who don't use TextMeshPro. To use TextMeshPro variables (for example: private TextMeshPro textMeshPro), you need to include: **using TMPro;** This however throws an error when the TextMeshPro asset *is not being used*.
So the thing is that I only need to use this namespace if the TextMeshPro asset is installed. I can't use custom defines, because then I won't be able to share this when it's finished.
Is there anyway I can prevent this error?

Viewing all articles
Browse latest Browse all 398

Trending Articles



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