Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- MyBaseClass.cs
- public abstract class MyBaseClass : MonoBehavior
- {
- public DataStorage DataStorage { get { return FindObjectOfType<DataStorageManager>().dataStorage; }}
- }
- ShowName.cs
- public class ShowName : MyBaseClass
- {
- void OnStart()
- {
- GetComponent<Text>().text = DataStorage.playerName;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment