Question by
blafed · Sep 18, 2015 at 03:08 PM ·
stringmonobehaviourglobal variable
How to create global string like tag in MonoBehaviour?
i want to create global string like tag, i'm tried :
public class MonoBehaviour : UnityEngine.MonoBehaviour {
public extern string OtherTag {get; set;}
}
it was succesful, but needs 'DllImportet' and i'm not know what this means, and gives error ' CS0626 ' ,
is there another way?
Comment
Best Answer
Answer by Dave-Carlile · Sep 18, 2015 at 03:09 PM
You don't need "extern". Just `public string OtherTag { get; set; }
Your answer
Follow this Question
Related Questions
\n Not picked up when reading string from file's name 1 Answer
how to read string from an IP address? 0 Answers
I need help with calling a string 1 Answer
Convert keycode to string 1 Answer
is there an efficient way to compare tags in code ? 0 Answers