Hi!
I have a problem using editor drag-and-drop component assignment.
I have components:
@ccclass('A')
export class A extends Component {
@property(B)
prop: B
}
@ccclass('B')
export class B extends Component {
}
@ccclass('C')
export class C extends B {
}
Now I want to set A’s prop in inspector. I can easily drag-and-drop B as A’s prop
Summary
But I can’t do the same with C
Summary
As far as C inherits B it’s should be okay to assign it as A prop. Is it possible to assign C? Can I write my own Extension?
Hello,i make a test,use Creator v3.x (v3.6.3 or v3.7.2),it is support to do the same with C.
Hi! I can see your ‘c’ component assigned from other object. This would work but in my case I have ‘a’, ‘b’ and ‘c’ components on the same object
It’s very strange to have B and C components together in one Node.
If you want to assign the same Node to a B property, then it won’t know which component should be using.
I suggest you to refactor your Node structure, and only have C component in your Node, because it already have all functionalities of B.