Skip to content

Troubleshooting

I am getting a MissingMethodException: Default constructor not found for type error on one of the IdleKit types when running my build

This error can occur when IdleKit assemblies are stripped out of the build by Unity's code stripping settings. To fix this: 1. Make sure you have a link.xml file at the root of your project's Assets folder 2. Make sure to include IdleKit assemblies in the file. Here is an example of the link.xml file we use in our Showcase project:

<linker>
    <assembly fullname="IdleKit.Gameplay" preserve="all" />
    <assembly fullname="IdleKit.Core" preserve="all" />
    <assembly fullname="IdleKit.Tools" preserve="all" />
    <assembly fullname="IdleKit.Analytics" preserve="all" />
    <assembly fullname="IdleKit.Segmentation" preserve="all" />
    <assembly fullname="IdleKit.Legal" preserve="all" />
    <assembly fullname="IdleKit.Segmentation" preserve="all" />

    <assembly fullname="Unity.ResourceManager, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null" preserve="all">
        <type fullname="UnityEngine.ResourceManagement.ResourceProviders.LegacyResourcesProvider" preserve="all" />
        <type fullname="UnityEngine.ResourceManagement.ResourceProviders.AssetBundleProvider" preserve="all" />
        <type fullname="UnityEngine.ResourceManagement.ResourceProviders.BundledAssetProvider" preserve="all" />
        <type fullname="UnityEngine.ResourceManagement.ResourceProviders.InstanceProvider" preserve="all" />
        <type fullname="UnityEngine.ResourceManagement.AsyncOperations" preserve="all" />
    </assembly>

    <assembly fullname="Unity.Addressables, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null" preserve="all">
        <type fullname="UnityEngine.AddressableAssets.Addressables" preserve="all" />
    </assembly>

    <assembly fullname="Unity.TextMeshPro" preserve="all" />
</linker>
3. Rebuild your project

When loading I hit a DataNotFoundException

  1. EntityDataAsset needs to be added to the GuidRefs file
  2. Reference to the DataAssets are lost in the EntitiesDatabase
  3. The DataAsset reference does not exist in the project

My custom Entity DataAssets are not appearing in the Guid reference lists within other DataAsset scriptable objects. I only see the default idlekit DataAsset types.

This can be caused if your custom Entity lives outside of an IdleKit assembly. If this is the case, your assembly will need to be referenced by the Guid ref system. This can be done by setting a filter on the AssemblyUtil class which can be done from within your project's editor code:

AssemblyUtil.SetFilter( (s) => s.StartsWith("IdleKit") || s.StartsWith("MyAssemblyName") );

When attempting to compile I hit many errors such as

.../LoopingContextBuilder.cs(2,15): error CS0234: The type or namespace name `Test' does not exist in the namespace `IdleKit'. Are you missing an assembly reference?

.../CanvasDebugPlotPointTool.cs(3,15): error CS0234: The type or namespace name `PlotPoints' does not exist in the namespace `IdleKit'. Are you missing an assembly reference?

Errors like this suggests that a package hasn't been installed correctly. Packages should live in /path/to/project/Assets/Packages/. If this path doesn't exist then please take a look the Accessing IdleKit Guide.

When I attempt to import csv data from an older/newer version of IdleKit the import process fails.

The simple asset importer that is included with IdleKit is not designed to be forward or backward compatible. Please make sure that the csv data you attempt to import was distributed with the version of IdleKit that you are using.

A Generator is not upgradable at run time

  1. check the RampingCoefficient on IGeneratorBalanceData might be set too high

I hit errors or have problems when running npm install

See the Troubleshooting section at the bottom of Accessing IdleKit for more information.

I reloaded my PlotPoint in the PlotPointEditor and now can't see the Actors in the scene

This occurs occasionally on reload of the a PlotPoint. Pausing and then playing the PlotPointEditor scene will cause the Actors to become visible.

I am getting compile errors regarding UnityEngine.UI on Unity 2019.3

Depending on your Unity version, the UnityEngine.UI may need to be included inside the asmdef files in order for the project to compile.

  1. Locate the following asmdef files in the Unity Project window: Assets/packages/idlekit-examples/Runtime/IdleKit.Examples.asmdef Assets/packages/idlekit-implementation/Runtime/IdleKit.Implementation.asmdef Assets/packages/idlekit-tools/Runtime/IdleKit.Tools.asmdef
  2. Click on the asmdef file
  3. Under Assembly Definition Resources, add a new reference by clicking on the + button
  4. Use the circle button in the new field to select Unity.ugui as a reference
  5. Apply the changes to the asmdef file

Inspector View for ASMDEF file

I added an IdleKit package to my project, but when I select it in the Unity Package Manager I get a FileNotFoundException error in the console

This occurs because of the filepath length limit of 260 characters on Windows. This can be solved in one of two ways: 1. If you are using Windows 10 you can increase the filepath length by following this guide. 2. If you are using a previous version of Windows, or a version of Windows 10 before the path length manipulation was introduced, you can relocate the project to a different folder to reduce nesting and prevent the path length error.

I have all the IdleKit packages correctly referenced in the Unity Package Manifest, however I am still getting multiple "Are you missing an assembly reference?" errors in the Unity console

This sometimes occurs when Unity's packages-lock.json file references older commit hashes for IdleKit repositories, therefore continuing to use the older versions of the packages. To fix this: 1. Delete your packages-lock.json file located in <your project folder>/Pacakges/packages-lock.json 2. Restart Unity so it can generate a new packages-lock.json 3. Make sure everything works, and commit the newly generated packages-lock.json to your version control system