Skip to content

Build error in Android. (UnityEditor.UIElements.StyleSheets in Runtime) #79

@HyunCello

Description

@HyunCello

Environment
Unity: 6.3 Beta (6000.3.0b10)
Platform: Android (Player build)
OneJS: d177bad

Error

/OneJS/Runtime/CustomStyleSheets/unity-6.3+/StyleSheetImportErrors.cs(4,19): 
error CS0234: The type or namespace name 'UIElements' does not exist in the namespace 'UnityEditor' (are you missing an assembly reference?)

Suspected cause

  • StyleSheetImportErrors.cs is under Runtime/CustomStyleSheets/unity-6.3+, but it uses:
using UnityEditor.UIElements.StyleSheets;
  • This file is compiled into player builds (Android), where UnityEditor.* assemblies are not available, so build fails.
  • In Unity 6.2 this path (unity-6.3+) was not used, so the issue did not show up. It seems to be a regression in the Unity 6.3 support code.
  • Functionally this class is only needed in the Editor (to report USS stylesheet import errors), so it probably should not live in a Runtime assembly.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions