-
Notifications
You must be signed in to change notification settings - Fork 64
Description
Describe the bug
When a component contains masks, the hierarchy in Unity gets an extra level (because in Unity the masking object needs to be the parent of masked objects).
This is causing an issue if any of the masked object need to be changed in the instance. The plugin fails to find those objects because they hide a level deeper in the hierarchy.
To Reproduce
Steps to reproduce the behaviour:
- Create a component with a rectangle masking a text object
- Create an instance of the component
- Change the text and colour of the text object in the instance
- Import to Unity
Expected behaviour
The importer could look into the masking objects when looking for objects to apply properties.
Log
Applying properties - Could not find child object I15:125;12:497 name bcg from parent node id I15:125;15:334 in parent transform background
UnityEngine.Debug:Log (object)
UnityFigmaBridge.Editor.Components.ComponentManager:ApplyFigmaProperties (UnityFigmaBridge.Editor.FigmaApi.Node,UnityEngine.GameObject,UnityFigmaBridge.Editor.FigmaApi.Node,UnityFigmaBridge.Editor.FigmaImportProcessData) (at ./Library/PackageCache/com.simonoliver.unityfigma@9bc41a73c7/UnityFigmaBridge/Editor/Components/ComponentManager.cs:266)
** Version**
- Unity 2022.3
- Platform macOS
- URP