How to get data saved on master server from a plugin?

Hello, I want to create a card game and store all information about each card on the mysql server. So the idea is my photon server at the start of running (MasterServer) connects to this db and saves all the informations into memory and i want to be able to access this data from the plugin position. The question is how can i get this data stored in MasterServer for each room (plugin), and is it safe (and possible) if multiple plugins will read at the same time from same object. Alternative solution would be plugin connects to db but it's super waste and i have to avoid it. Thanks for all answers.

Comments

  • hi, @fake
    you can not get any thing from master server the way you proposed.

    you should load this data once from your plugin factory. Plugin factory is created once. you may load data from there. or load it once from Plugin.Setup. it will be probably slow, but only once. so some first games will be crated slower then usual, that is it

    best,
    ilya
Sign In or Register to comment.