- Home /
Access List from singleton database script
If this has been successfully answered previously, please send me to the best link. After looking at quite a number of questions, I'm even more confused.
Working on an RPG. Have successfully refactored the code to run an an SQL database and into a singleton pattern. The gameobject is created at runtime. In each table I create a List based on its property script(I'm creating it there because it accesses the database). The other script is attached to the top panel where I want to display the character's name and stats, but I'm having trouble getting access to the list.
PlayerDatabaseManager PDM; void Awake() { PlayerDatabaseManager.Instance.LoadPersonal(); }
// Use this for initialization
void Start ()
{
PDM.GetComponent<PlayerDatabaseManager>.Personal();
Personal=PDM.Personal.Name();
}
I'm confused what to put where. DOes personal need to be of type databasemanager or of type personal? Thanks in advance!
Your answer

Follow this Question
Related Questions
Multiple Cars not working 1 Answer
Distribute terrain in zones 3 Answers
Return List from Singleton 1 Answer
List Set in Editor no longer contains Items after Transplant to new Level (pooler = singleton) 0 Answers
A node in a childnode? 1 Answer