How to build for platform windows phone 8 from Unity

Post here your questions about the Unity / .Net / Mono / Windows 8 / Windows Phone 8 API for SFS2X

Moderators: Lapo, Bax

Post Reply
hanyu279
Posts: 3
Joined: 09 Jun 2015, 09:38

How to build for platform windows phone 8 from Unity

Post by hanyu279 »

I downloaded SFS2X_API_CSharp_v1.6.0.zip, now I want to build with Unity 5.0.2
How to use *dll files in this folder to build project(WP8) without error?

I read the Unity paragraph on this page: http://docs2x.smartfoxserver.com/Gettin ... harp#unity
Also read the text on this page: http://docs.unity3d.com/Manual/wp8-plugins.html
but can not build successfully with WP8.

Thanks in advance.
User avatar
Lapo
Site Admin
Posts: 23438
Joined: 21 Mar 2005, 09:50
Location: Italy

Re: How to build for platform windows phone 8 from Unity

Post by Lapo »

Can you explain exactly what kind of errors you're getting?
Lapo
--
gotoAndPlay()
...addicted to flash games
User avatar
Lapo
Site Admin
Posts: 23438
Joined: 21 Mar 2005, 09:50
Location: Italy

Re: How to build for platform windows phone 8 from Unity

Post by Lapo »

NOTE: the latest API (1.6.0) support Windows Phone 8.1 and higher.
If you're are targeting WP8 you will need the previous API, 1.5.7

Downloads are here:
http://www.smartfoxserver.com/download/sfs2x#p=client
Lapo
--
gotoAndPlay()
...addicted to flash games
User avatar
Bax
Site Admin
Posts: 4626
Joined: 29 Mar 2005, 09:50
Location: Italy
Contact:

Re: How to build for platform windows phone 8 from Unity

Post by Bax »

Are you building for Windows Phone 8 o Windows Store (which targets Phone 8.1 SDK - in other words Windows Phone 8.1)?
This is quite important because the API v1.6.0 is compatible with Windows Store builds only (instructions here - see "Windows Universal" paragraph).

If you want to build for Windows Phone 8 specifically (option which, I believe, Unity will drop soon), then you have to use the previous API (v1.5.7).
As you are using Unity 5, you also have to link the DLL following the new rules of Unity 5.
I know, it is very confusing, but that's the way Unity works...

Please list the exact steps you are doing, so we can try to help.
Paolo Bax
The SmartFoxServer Team
hanyu279
Posts: 3
Joined: 09 Jun 2015, 09:38

Re: How to build for platform windows phone 8 from Unity

Post by hanyu279 »

I use "Connector" example in Unity 5 examples pack .From url "http://smartfoxserver.com/download/sfs2x#p=examples"
I downloaded this dll version 1.5.7 replace and put in path /Plugins/WP8 , I tick Wp8Player check box in Inspector .
Then select BuildSetting/Windows Phone8 with error CS0246: The type or namespace name `Sfs2X' could not be found. Are you missing a using directive or an assembly reference?
How to run this example in editor then build test in both windows phone 8.0, 8.1 ?
User avatar
Bax
Site Admin
Posts: 4626
Joined: 29 Mar 2005, 09:50
Location: Italy
Contact:

Re: How to build for platform windows phone 8 from Unity

Post by Bax »

In the Inspector, when editing the Plugins/WP8/SmartFox.dll properties, try setting the "Placeholder" property to Plugins/SmartFox.dll.
Paolo Bax
The SmartFoxServer Team
hanyu279
Posts: 3
Joined: 09 Jun 2015, 09:38

Re: How to build for platform windows phone 8 from Unity

Post by hanyu279 »

i builded successful. Thank team support ,very much.
Post Reply