- changed status to open
Error connected with RequireComponent attribute.
Issue #41
resolved
There is an error when reverting prefab which had a component required by other (let's call it RequiredComponent) and a component that requires RequiredComponent (let's call it DependentComponent). Error shows up when we are reverting this prefab after removing both of the components. It seems to be caused by the system first trying to DestroyImmediate the RequiredComponent which is obviously impossible before DependentComponent is destroyed. So the reverting has to be done twice for both of the components are destroyed.
Steps to reproduce:
- Create Child object and Parent object, make them prefabs.
- Make Child prefab a child of Parent prefab.
- Create RequiredComponent and DependentComponent, make Dependent require RequiredComponent and attach both to Child prefab. Revert so the instance under Parent prefab is updated.
- Remove DependentComponent and RequiredComponent from Child and Revert - here is the error, Child under Parent have only DependentComponent removed.
- Revert Child again - Child under Parent have now both components removed as it should.
Comments (2)
-
-
- changed status to resolved
Submitted to v1.8f2. Should be live in the asset store in a week or so.
- Log in to comment
Good find. I will take a look into this, and submit a fix to the asset store!
Thanks again,