poohcom1 / godot-private-exports

A Godot addon that lets you set access modifier for exported variables!
https://godotengine.org/asset-library/asset/2136
MIT License
22 stars 0 forks source link

Implement a system to deal with change that happens regardless of access modifier #5

Closed poohcom1 closed 1 year ago

poohcom1 commented 1 year ago

Currently, this addon only hides properties marked as private or protected, but it does nothing to prevent or detect actual change. For example, certain properties like position can be changed outside the inspector. Properties may have also already been modified prior to being set to private. A proper access modifier should completely prevent such changes from happening.

However, there are a few technical and design concerns before this can be implemented:

  1. When will this detection run? If this runs when the inspector is opened, how can we ensure that properties that aren't being actively modified remain unchanged?
  2. Should the change happen automatically? It can be dangerous for an addon to modify a scene implicitly without the user's active control.
poohcom1 commented 1 year ago

Added warning on properties with unexpected changes and show the property regardless of modifier to allow developer to reset value if needed.