Skip to content

partial class 有部分代码是Editor下专用,生成代码后打包手机报错 #484

Closed

Description

@leechking1987

我有一个partial class 部分代码是在Editor下条件编译的,但是整个类打上hotfix标签后Generate Code后将许多Editor下用的类导出到了DelegateBridge,我看了下主要是Editor下用的部分函数的返回值用到了Editor下专用的类。我尝试给这些函数加上blacklist也无法使其不生成,不知道有没有什么好办法?

Activity

  1. leechking1987 commented on Nov 8, 2018

    @leechking1987
    Author

    这是因为Hotfix列表里头配置的类型(假设是类型A),对这些不存在的类型(假设是类型B)引用。找到这种类型,从Hotfix配置列表中排除(注意,排除的类型A,而不是类型B)。

    我明白直接排除掉A就可以解决报错,但是我现在想A的正常代码可以被hotfix,但是Editor的部分不需要生成。也就是说A需要在Hotfix的配置列表中,但是A的某些函数不需要hotfix,也不需要生成到DelegateBridge,这个可以做到吗?

  2. chexiongsheng commented on Nov 8, 2018

    @chexiongsheng
    Collaborator

    不支持。

  3. leechking1987 commented on Nov 8, 2018

    @leechking1987
    Author

    好的,非常感谢,我想想其他办法

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions