gpvigano / AsImpL

Asynchronous Importer and run-time Loader for Unity
MIT License
212 stars 37 forks source link

Can't build #35

Closed KuraiAndras closed 5 years ago

KuraiAndras commented 5 years ago

Problems & bugs

In editor play mode everything works, but can't build the project due to error

Environment

Please specify:

  • version of AsImpL b448db28752e4ac1235351da2a8e56edd0752c72
  • version of Unity3D v2018.3.8

Steps to reproduce

Add assets to unity, build to any platform (eg. windows-x64)

Expected behavior

Build is successful

Current behavior

Build fails with message Assets\AsImpL\Scripts\ObjectImporter.cs(88,24): error CS0103: The name 'importAssets' does not exist in the current context

The problematic code: ObjectImporter.cs:88 public bool AllImported { get { return importAssets ? importPhase == ImportPhase.Done : allLoaded; } }

It seems that the importAssets field is only created in Editor mode, yet it is referenced regardless of context ObjectImporter.cs:23

if UNITY_EDITOR

    /// <summary>
    /// Import the model as a set of assets. This should be set only by the Editor window.
    /// </summary>
    [HideInInspector]
    public bool importAssets = false;
gpvigano commented 5 years ago

Sorry, my fault. A previous automatic refactoring with Visual Studio did not refactor the code excluded by platform-dependent directives. I fixed this in my last commit.

KuraiAndras commented 5 years ago

It works now, good job!