(Unity API) About SmartFox.LoadConfig
(Unity API) About SmartFox.LoadConfig
I'm using Unity3D API, here is my question, where should I put sfs-config.xml in my project so that LoadConfig could work on both Android and iOS? I put my sfs-config.xml in Asset/Scripts/, but I cannot read the config file on both of Android and iOS. It totally works on Mac or Windows, but how should I do to read it on mobile platform?
Re: (Unity API) About SmartFox.LoadConfig
Hi,
yes the external configuration won't work on mobile devices.
My suggestion is to do all via code using the ConfigData object to pass the connection parameters to the SmartFox.Connect method.
In other words:
You can learn more details about these objects in the C# doc:
http://docs2x.smartfoxserver.com/api-docs/csharp-doc/
hope it helps
yes the external configuration won't work on mobile devices.
My suggestion is to do all via code using the ConfigData object to pass the connection parameters to the SmartFox.Connect method.
In other words:
Code: Select all
var cfg = new ConfigData()
cfg.Host = "www.mygamesite.com"
cfg.Port = 9933
cfg.Zone = "MyGameZone"
...
...
var sfs = new SmartFox();
...
sfs.Connect(cfg);
You can learn more details about these objects in the C# doc:
http://docs2x.smartfoxserver.com/api-docs/csharp-doc/
hope it helps
Re: (Unity API) About SmartFox.LoadConfig
Thanks man, now I know what to do.
Who is online
Users browsing this forum: No registered users and 96 guests