Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Regression: GDScript but not C# is able to set Blend Shapes values via code #47543

Closed
GeorgeS2019 opened this issue Apr 1, 2021 · 14 comments
Closed

Comments

@GeorgeS2019
Copy link

GeorgeS2019 commented Apr 1, 2021

GDScript but not C# is able to set Blend Shapes values via code

Godot version: 3.3 RC 7
OS/device including version: Windows 10

Minimal reproduction project:
[BlendShapeCsharp.zip]
(https://github.com/godotengine/godot/files/4208427/BlendShapeCsharp.zip)

#36243 (comment)
._Set for c# does not work any more

@Calinou
Copy link
Member

Calinou commented Apr 1, 2021

@GeorgeS2019 Which Godot version did it last work in? Can you test all older RCs to check where the regression started happening?

@GeorgeS2019
Copy link
Author

GeorgeS2019 commented Apr 1, 2021

@Calinou
Godot version: 3.2 (stable) mono
OS/device including version: Windows 10 19014
#36243

Can you test all older RCs to check where the regression started happening?

I now use c# to call GDScript to by pass c# functions no longer work.

To prevent regression in future, we need to include e.g. a simple test as provided here to check blendshape set in c# works in each release.

Godot team and community needs to identify fundamental core functions DO work before each release. Ideally, we need a battery of unit tests for C#.

Now that many developers have independently provided thier ways of implementing unit test for c#, we need the Godot team to decide an official version and lead directions WHAT are a battery of unit tests must be checked before each release to minimize regression of core functionalities.

@Calinou
Copy link
Member

Calinou commented Apr 1, 2021

@GeorgeS2019 I've seen the issue you've linked, but it's pretty old by now. Can you test this in 3.2.3 and older 3.2.4 RCs to determine when this stopped working? (3.2.4 was renamed to 3.3 during the development process, but they are fundamentally the same branch.)

I don't have a Mono setup here, so I can't test this myself.

@GeorgeS2019
Copy link
Author

@Calinou Tested 3.2.3 => failed, so I would not proceed to 3.2.4 RCs

Very strange, I could not be the only one in c# needing BlendShape.

@Calinou
Copy link
Member

Calinou commented Apr 1, 2021

@GeorgeS2019 Thanks, can you test 3.2.1 and 3.2.2 as well? (Note that you'll have to create new projects for each version since they're not fully backwards/forwards compatible.)

@GeorgeS2019
Copy link
Author

@Calinou Can you please help me where to look the c++ code.. I think it is more relevant to avoid this problem in future myself.

@GeorgeS2019
Copy link
Author

@neikeq Do you have idea how to prevent this regression?

@31
Copy link
Contributor

31 commented Apr 1, 2021

Changing to .Set instead of ._Set as recommended/accepted in #36243 works for me in 3.3 rc7:

image

(Changed the code a bit to make the equivalence more obvious: used 0.5f instead of randf(), and used an orthogonal camera.)

@GeorgeS2019 Why are you using ._Set instead of .Set? When did that work?

@GeorgeS2019
Copy link
Author

GeorgeS2019 commented Apr 1, 2021

@31

Was recommended to use ._Set in c# => and it worked before for c#!

image

@GeorgeS2019
Copy link
Author

@31 can u attach a working c# mono 3.3 rc7 so I can test. Thank you.

@31
Copy link
Contributor

31 commented Apr 1, 2021

Was recommended to use ._Set in c# => and it worked before for c#!

From a quick look, you're calling set in GDScript but _Set in C# instead of Set. Could that be the cause?

I actually get the opposite impression from that comment. 😄 To me, it's saying the problem with your code is that you're using _Set. It's different from the GDScript, where you use set. (The equivalent to GDScript's set in C# is Set.)

can u attach a working c# mono 3.3 rc7 so I can test. Thank you.

I downloaded the zip, (deleted .mono and .import to make sure I get a fresh build), then made this change in Sphere.cs:

-        this._Set("blend_shapes/Morphed Sphere", 0.25);
+        this.Set("blend_shapes/Morphed Sphere", 0.25);

then it worked for me in 3.3 rc7.

@GeorgeS2019
Copy link
Author

@31 no luck :-( => it is unfortunate, ._Set and .Set is even a question for c# developer and making Blendshape c# works is like climbing Everest, full of time wasting paths.

@31
Copy link
Contributor

31 commented Apr 1, 2021

@GeorgeS2019 Huh... can you upload a new copy of your project after the change + rebuild + run? I wonder if our .NET assemblies are ending up different.

@GeorgeS2019
Copy link
Author

@31 so far, I do not have other problems with godot 3.3rc7 except this particular function. Godot should not be so complicated to get BlendShape works. Thank you for your help. No more effort.

@Calinou Calinou removed this from the 3.3 milestone Apr 1, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants