Error on Unity examples pack

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

Moderators: Lapo, Bax

Ardito
Posts: 48
Joined: 12 Sep 2016, 11:26
Location: Italy

Error on Unity examples pack

Postby Ardito » 02 Oct 2019, 11:32

Hi,
I tried the SFS2x examples with Unity 2019.2.6f1 (64-bit), and I get this:

Debug:
Rebuilding Library because the asset database could not be found!

Warning:
Assets\ConnectorAssets\Scripts\Connector.cs(31,14): warning CS0414: The field 'Connector.defaultWsPort' is assigned but its value is never used

Errore:
Assets\BaseSceneAssets\PostProcessing\Editor\PropertyDrawers\MinDrawer.cs(6,34): error CS0104: 'MinAttribute' is an ambiguous reference between 'UnityEngine.PostProcessing.MinAttribute' and 'UnityEngine.MinAttribute'
User avatar
Bax
Site Admin
Posts: 4478
Joined: 29 Mar 2005, 09:50
Location: Italy
Contact:

Re: Error on Unity examples pack

Postby Bax » 03 Oct 2019, 13:14

Ardito wrote:Debug:
Rebuilding Library because the asset database could not be found!

This is expected; due to the way we distribute our examples, the first time you import it, the assets database must be rebuilt.
You shouldn't see it again if you save and reopen the project.

Ardito wrote:Warning:
Assets\ConnectorAssets\Scripts\Connector.cs(31,14): warning CS0414: The field 'Connector.defaultWsPort' is assigned but its value is never used

Again, this is expected. The example (most of our examples actually) is compatible with multiple target builds.
In particular, Connector.defaultWsPort refers to the web socket port, which is used if you select "WebGL" as target build only.
You can ignore this warning.

Ardito wrote:Errore:
Assets\BaseSceneAssets\PostProcessing\Editor\PropertyDrawers\MinDrawer.cs(6,34): error CS0104: 'MinAttribute' is an ambiguous reference between 'UnityEngine.PostProcessing.MinAttribute' and 'UnityEngine.MinAttribute'

I confirm there's an error. I guess Unity changed something, and now their own base assets (which we used to create the examples) don't work anymore.
As a temporary workaround you can fix the issue by yourself:
- open this file in any code or text editor: /Assets/BaseSceneAssets/PostProcessing/Editor/PropertyDrawers/MinDrawer.cs
- search and replace all entries of "MinAttribute" with "UnityEngine.PostProcessing.MinAttribute" (should be 3)
- save
In the next days we will update all our examples to fix this issue. Thank you for reporting.
Paolo Bax
The SmartFoxServer Team
User avatar
Bax
Site Admin
Posts: 4478
Joined: 29 Mar 2005, 09:50
Location: Italy
Contact:

Re: Error on Unity examples pack

Postby Bax » 03 Oct 2019, 13:37

We updated the Unity examples package in the download page:
https://www.smartfoxserver.com/download ... p=examples
Paolo Bax
The SmartFoxServer Team
Ardito
Posts: 48
Joined: 12 Sep 2016, 11:26
Location: Italy

Re: Error on Unity examples pack

Postby Ardito » 03 Oct 2019, 17:44

Perfect

Return to “SFS2X C# API”

Who is online

Users browsing this forum: No registered users and 3 guests