[Solved] New in 1.3ß - How to add Scene Childs and other questions?

Hi,

I just downloaded the new 1.3ß, congratulations on the great work! I am happy to see so many things added and fixed.

I do have a few questions though :blush:

  • I might have overlooked that in the news, but I think it was not mentioned:

    Warning CS0612 ‘Scene.AddChild(Entity)’ is obsolete

How would I now go about adding entities to the scene (at top level)?

  • I read all the news about the gamma and linear lighting, but frankly I have no clue what exactly this means. From the news i take it that using gamma color space is the way to go (?), yet the default project setting is linear? Should I switch that or rather stick with it?

  • Also trying to import a project from 1.2 finally stopped with the asset compiler complaining that one of my components [A] cannot be cast to [B], but the mentioned types and sources for [A] and [B] are exactly the same. I cleaned and reubild the solution, re-saved and opened it both in Visual and Paradox Studio, added
    <AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects>
    to the project file, but neither did help (I also uninstalled V1.2 meanwhile). Does anyone have an idea on what could be the issue here?

[A]SiliconStudio.Core.PropertyKey`1[MyGame1.CustomComponents.DockingPortComponent] cannot be cast to [B]SiliconStudio.Core.PropertyKey`1[MyGame1.CustomComponents.DockingPortComponent].

Type A originates from ‘SiliconStudio.Core, Version=0.1.0.0, Culture=neutral, PublicKeyToken=null’ in the context ‘Default’ at location ‘C:\Program Files\Silicon Studio\Paradox\GamePackages\Paradox.1.3.0-beta\Bin\Windows-Direct3D11.shadow\SiliconStudio.Assets.CompilerApp_ExecServer.exe\assembly\dl3\ce104695\cca7572f_90f1d001\SiliconStudio.Core.dll’.

Type B originates from ‘SiliconStudio.Core, Version=0.1.0.0, Culture=neutral, PublicKeyToken=null’ in the context ‘Default’ at location ‘C:\Program Files\Silicon Studio\Paradox\GamePackages\Paradox.1.3.0-beta\Bin\Windows-Direct3D11.shadow\SiliconStudio.Assets.CompilerApp_ExecServer.exe\assembly\dl3\ce104695\cca7572f_90f1d001\SiliconStudio.Core.dll’.

Thanks

Sorry for your trouble, we will try to investigate.

In the meantime, does adding true fix your problem?

For the Scene.AddChild, you can still use this method. We may rename it later to Add() instead.

For the exception, as a workaround, you can setup the env variable DisableAssetCompilerExecServerProxy to true to disable the proxy asset compiler. We will have look asap why this is happening.

For the settings for a default project, Linear is the default correct one. It means that calculations are done in linear space while textures/images/colors values stored are in gamma space (and we call this a gamma correct pipeline, which can be confusing!). We will add a proper documentation page about this.

We just released a new 1.3.1 version that should fix your exception while building the assets. You don’t need to use the environment variable.

Awesome, thank you very much!
I see the YAML serialization was fixed too, great!

So many new things to explore now, I need to play around with the new lighting now to get the hang of it (everything is blown out now, guess I have to take all my directional lights down a notch or two :wink:

Another thing that popped up: I am trying to adjust my LightComponent’s Color with the new SetColor() accessor now (it’s a PointLight Entity), but I get a runtime exception:

System.InvalidOperationException: The LightComponent doesn't contain a color light type IColorLight
at SiliconStudio.ParadoxEngine.LightComponentExtensions.SetColor(LightComponent light, Color3 color)

No biggy though, I guess I can still set Color the old way or find another one by just checking the source.

Thanks again for your amazing support

@seven: The normal way to add children to a scene is now to directly Add/Remove elements to the Scene.Entities collection.

The SetColor crash is a known issue that have been fix already in last patch release, so I mark the thread as solved.

Thanks for the feedback on the scene childs, I’ll adjust my code appropriately.

Yeah I saw the SetColor fix in 1.3.3 and closed the issue on Github but forgot to also mark this thread here, sorry!