You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the problem or limitation you are having in your project
User defined Classes don't act anything like Built-in Classes (like Node3D, CharacterBody3D etc.)
User Classes add a regular old Script which has the downside of erasing any modified Class variable data when changing to a script that extends the User Class
Example:
User Class - Vehicle has a variable Speed
Vehicle Controller is a Script that extends Vehicle
Assigning Vehicle Controller Script to the Vehicle resets Speed
This basically breaks any logic where you have to switch controllers around dynamically (like No controller - no Script, AI controller - AI script, Player controller - Player script)
Describe the feature / enhancement and how it helps to overcome the problem or limitation
Add a Class_Script that would hold the Script of any User Classes in essence making User Classes act like Built in Classes from the User's perspective
This would mean:
In the Editor User Classes would no longer have a Script defined, just a Class, albeit they'd have a link to the user script defining the class instead of built-in
Setting Scripts wouldn't Reset all User Class Variables
This resolves the issue in the example above as Class Variables are shielded from resetting when setting a script
In the example above that would mean that much like when you set a script extending Node3D you don't lose your position, you wouldn't lose the vehicle's Speed
Describe how your proposal will work, with code, pseudo-code, mock-ups, and/or diagrams
Simply apply the Built-in Class logic to User Defined Classes, with the one difference of having a Variable for User defined Classes that would store the Class Script.
If this enhancement will not be used often, can it be worked around with a few lines of script?
You cannot fully workaround User Classes not behaving like Built-in Classes
Is there a reason why this should be core and not an add-on in the asset library?
This is a issue with Core
The text was updated successfully, but these errors were encountered:
Describe the project you are working on
FPS
Describe the problem or limitation you are having in your project
User defined Classes don't act anything like Built-in Classes (like Node3D, CharacterBody3D etc.)
User Classes add a regular old Script which has the downside of erasing any modified Class variable data when changing to a script that extends the User Class
Example:
User Class - Vehicle has a variable Speed
Vehicle Controller is a Script that extends Vehicle
Assigning Vehicle Controller Script to the Vehicle resets Speed
This basically breaks any logic where you have to switch controllers around dynamically (like No controller - no Script, AI controller - AI script, Player controller - Player script)
Describe the feature / enhancement and how it helps to overcome the problem or limitation
Add a Class_Script that would hold the Script of any User Classes in essence making User Classes act like Built in Classes from the User's perspective
This would mean:
This resolves the issue in the example above as Class Variables are shielded from resetting when setting a script
In the example above that would mean that much like when you set a script extending Node3D you don't lose your position, you wouldn't lose the vehicle's Speed
Describe how your proposal will work, with code, pseudo-code, mock-ups, and/or diagrams
Simply apply the Built-in Class logic to User Defined Classes, with the one difference of having a Variable for User defined Classes that would store the Class Script.
If this enhancement will not be used often, can it be worked around with a few lines of script?
You cannot fully workaround User Classes not behaving like Built-in Classes
Is there a reason why this should be core and not an add-on in the asset library?
This is a issue with Core
The text was updated successfully, but these errors were encountered: