- Home /
 
How do I transfer my network between scenes?
So I'm converting my network to work from an old application I wrote in C# to a unity project. So far I have no problems but one, In my old program I would declare my network class in Program.cs and It could be accessed throughout the entire project using Program.network, where network would be an instance of my network class. Now, however, there is no Program.cs so how can I access the created instance of my network from another scene, or create a globally accessible network class instance?
a static variable pointing towards a DontDestroyOnLoad networkView :) 
(class holding the static variable).(static variable).(what ever you want)
Like any other static variable
could I just make the whole class static then? Becuase the reason why I didn't just use a static socket for the network class was because the socket was receiving data.
That depends on many things. But you could definitely try :)
Your answer
 
             Follow this Question
Related Questions
Multiple Cars not working 1 Answer
Distribute terrain in zones 3 Answers
C# How to have a gun select 1 Answer
How to do health thru network 1 Answer
RPC call not sending correct data 0 Answers