Skip to content

希望能暴露 cc.TextureBase . #18960

@finscn

Description

@finscn

Use Case

目前在自己的项目里 , 无法直接使用类型 cc.TextureBase.

但是实际项目中会用用到.

比如希望某组件的 属性 既能支持 texture2d, , 又能支持 rendertexture .
如果能使用 cc.TextureBase 作为属性类型的声明, 就能同时支持了.

目前 @Property 不支持多类型, 所以也没办法用

@property(cc.Texture2D | cc.RenderTexture)

Problem Description

.

Proposed Solution

No response

How it works

No response

Alternatives Considered

.

Additional Information

No response

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions