There is a use case to migrate properties, e.g. change their type without deleting or creating new properties. Reason being is that child categories + entities may have been set up and it is annoying to migrate them to the changed property.
How it works
depends on #15
Inside the advanced property settings, users can change the property type via dropdown. This prompts the user with a popup to confirm (as it may have side effects). Any property would need to be cleared that cannot be migrated (including all values configured on children + overrides) - however, some values should be compatible and migrated:
String
| From type |
to type |
old value |
new value |
notes |
string |
int |
"3" |
3 |
when value cannot be parsed, default to property default value |
string |
bool |
"true" |
true |
when value cannot be parsed, default to property default value |
string |
float |
"1.2" |
1.2 |
when value cannot be parsed, default to property default value |
string |
reference |
"12" |
PandoraEntity(id=12) |
when entity cannot be found, default to property default value |
string |
resource |
"res://icon.svg" |
res://icon.svg |
when value cannot be parsed, default to property default value |
Integer
| From type |
to type |
old value |
new value |
notes |
int |
string |
12 |
"12" |
- |
int |
bool |
- |
- |
Reset to new type default |
int |
float |
3 |
3.0 |
- |
int |
reference |
- |
PandoraEntity(id=12) |
when entity cannot be found, default to property default value |
int |
resource |
- |
- |
Reset to new type default |
Float
| From type |
to type |
old value |
new value |
notes |
float |
int |
2.3 |
2 |
Values are rounded |
float |
bool |
- |
- |
Reset to new type default |
float |
string |
2.5 |
"2.5" |
- |
float |
reference |
- |
- |
Reset to new type default |
float |
resource |
- |
- |
Reset to new type default |
Bool
| From type |
to type |
old value |
new value |
notes |
bool |
int |
- |
- |
Reset to new type default |
bool |
string |
true |
"true" |
- |
bool |
float |
- |
- |
Reset to new type default |
bool |
reference |
- |
- |
Reset to new type default |
bool |
resource |
- |
- |
Reset to new type default |
Reference
| From type |
to type |
old value |
new value |
notes |
reference |
int |
PandoraEntity(id=123) |
123 |
when entity cannot be found, default to property default value |
reference |
string |
PandoraEntity(id=123) |
"123" |
when entity cannot be found, default to property default value |
reference |
float |
PandoraEntity(id=123) |
123.0 |
when entity cannot be found, default to property default value |
reference |
bool |
- |
- |
Reset to new type default |
reference |
resource |
- |
- |
Reset to new type default |
Resource
| From type |
to type |
old value |
new value |
notes |
resource |
int |
- |
- |
Reset to new type default |
resource |
string |
"res://test.png" |
"res://test.png" |
- |
resource |
float |
- |
- |
Reset to new type default |
resource |
bool |
- |
- |
Reset to new type default |
resource |
reference |
- |
- |
Reset to new type default |