stride icon indicating copy to clipboard operation
stride copied to clipboard

classes with 2 generics create clutter in GameStudio.

Open Doprez opened this issue 2 years ago • 4 comments
trafficstars

Release Type: Official Release

Version: 4.1.0.1805

Platform(s): Windows

Describe the bug There seems to be a minor bug with classes that have 2 generic types attached to them.

image

To Reproduce Steps to reproduce the behavior:

  1. create a class that inherits a SyncScript or StartupScript

  2. make 2 generic types in the class image

  3. go to Gamestudio and they will show like above

Expected behavior A clear and concise description of what you expected to happen.

not sure what should be expected I would assume they shouldnt show at all. If I try to add those class to an Entity it wont let me so this is purely visual noise.

Additional context This is a very minor bug but if something like DataMemberIgnore exists for classes it would be nice to clean this up and may be an easy work around.

Doprez avatar Mar 10 '23 23:03 Doprez

image this also happens with a single generic described in the class

using Stride.Engine;

public class TestGeneric <T> : StartupScript
{
	public bool IsBroken{get;set;}
}

Doprez avatar Mar 10 '23 23:03 Doprez

The solution is to filter out types which are generic as they can't be constructed.

To be perfectly honest I don't think it is expected that scripts, or components in general, would be generic. It can only make sense for things instantiated through code.

manio143 avatar Mar 12 '23 09:03 manio143

Reopening because I still think there's a fix to be made for this - we should prevent editor failures, even if user has generic components in the code.

manio143 avatar Mar 13 '23 16:03 manio143

Ah no worries I was too quick to close sorry.

Doprez avatar Mar 13 '23 16:03 Doprez