+1 vote

I have been playing around with paronama sky animating Day/Night cycle in C#, while using this line:

SkySphere.Environment.SetSkyRotationDegrees(new Vector3(0, timeOf, 0));
(timeOf is the calculated time of the day variable)

it works but I get this problem in VS Code:

[deprecated] void Godot.Environment.SetSkyRotationDegrees(Vector3 eulerDegrees)
'Environment.SetSkyRotationDegrees(Vector3)' is obsolete: 'SetSkyRotationDegrees is deprecated. Use the BackgroundSkyRotationDegrees property instead.' [SkySphere_Demo]

My questions is how do we use BackgroundSkyRotationDegrees property?

Godot version v3.2.3 mono
in Engine by (13 points)

1 Answer

+1 vote

i think the explanation is pretty clear: the SetSkyRotationDegrees() method you are using is depecrated (i think it will likely be removed in future versions), and it is suggesting to set the BackgroundSkyRotationDegrees property directly

by (1,436 points)

So do you know how you'd set the property directly with c#, mostly for automation reason's since we'll probably loose SetSkyRotationDegrees() method in the future. I also checked for BackgorundSkyRotationDegrees Property Implimantation and there's nothing currently.

i'm no C# expert, but in GDscript would be

SkySphere.environment.background_sky_rotation_degrees=value

isnt it the same in c?

Welcome to Godot Engine Q&A, where you can ask questions and receive answers from other members of the community.

Please make sure to read How to use this Q&A? before posting your first questions.
Social login is currently unavailable. If you've previously logged in with a Facebook or GitHub account, use the I forgot my password link in the login box to set a password for your account. If you still can't access your account, send an email to webmaster@godotengine.org with your username.