maybe i am missing something, but im trying to load a config file in unity, and nothing i seem to try works.
i have even tried LoadConfig("C:/sfs-config.xml"); but the only event that ever gets fired is CONFIG_LOAD_FAILURE, and setting the LoadConfig bool to true will not attempt a connection. Also (Application.dataPath + "/sfs-config.xml")... and i am positive its in the right folder as ive put it in every folder (just to see)
this is the xml file im using (from the API Docs, but with the correct port)
I have been having the same issue loading the sfs-config.xml file. I am using C# 2008 not containing any SWF's yet. I am trying to use SmartFox2.dll ver.0.9.4.0 to extract the available servers to provide a listing but am not able to load the config file..
Regardless of what I do, and the fact that I have the sfs-config.xml file in the bin and root of the website, I get nothing but SFSEvent.CONFIG_LOAD_FAILURE. There is no error message provided so there is no way for me to figure out what this thing is doing or what is going wrong without guessing.
I have tried every variation of the LoadConfig parameters as well as placing the config file in all the places I thought would work. Also passing the entire file path and again no success.
It may be that you dont have all the entries correctly formatted in the sfs-config.xml file... however, if you are just trying with a web build, LoadConfig is not compatible... it will only works with standalone build.
If I understand you correctly, I cannot access SFS with C# through a web interface. So if having the browser based requirement for the available server selection it will have to be done through an SWF? Are there any other options?
No, you can use C# (with Unity) and build a WebPlayer that will connect to a SmartFox server... its loading the config file that can not be done.
(that is how I am using it, I am building a WebPlayer, but instead of using the config file, the information is "hard-coded"... and remember the config file is completely optional)
All I can do is "smile" right now. I kept on going through the tutorials even though I couldn't get LoadConfig to work for me. I am new at this, so I thought I'd just keep on getting familiar with the commands. I really have to laugh at myself now, as I am at the end and I have commented out almost the entire script and nothing works now. I know I must be missing something fairly minor and of course, the config file was optional. Like I said, I wanted the practice and enjoy searching for the ideas of others to fix the code.
The application.dataPath was giving me trouble as well.
If you want to help me, that would be great. If not, thank you for your time in producing these videos. I will keep plugging along, taking out and putting back. I should at least be able to get it back to Logging In. <grin> I really need this for a project I'm doing with Unity3D 3.5 release. The other guys are scrambling for a way around it; a quick fix somewhere else until we can get this SFSX2 connect figured out. They are leaving me alone, but rest assured, if I manage to get the code fixed, there will be sushi for everyone!