Home > other >  In Unity2019.4.1 f1 VisualStudio custom class library how to reference the PackageManager package
In Unity2019.4.1 f1 VisualStudio custom class library how to reference the PackageManager package

Time:09-26

Scene: the Unity of our project is divided into three parts, development engineering, android packaging engineering, iOS packaging project.

We have our own class library called Base, the Base is responsible for the most basic function for the upper business code USES call. Such as resource path management, management and the support of the Timeline.

Such as we need to inherit PlayableBehaviour rewrite OnBehaviourPlay method. That this sort of situation. The Base requires references to the Timeline PlayableBehaviour class.

. In other words, in accordance with the previous approach is quoted UnityEngine Timeline. DLL files, but made the Package in the PackageManager Timeline now installation and management.

No UnityEngine. Timeline. DLL file, so can't in VisualStudio add references, research, found in the Library/ScriptAssemblies can find Unity. The Timeline. DLL.

Try and add a copy to the VisualStudio engineering reference, Base at this time. DLL compiler generates the success, will Base. The DLL is placed to develop engineering Assets/Plugins. Development engineering run everything is normal,

Start the android package project, try to pack the android applications, will all resources and Base. The DLL with other business code compiler generated DLL package copy to packaging engineering. But in the following error has occurred in the process of Build.

Simple understanding means Base. DLL cited UnityEngine. The Timeline of the assembly (although I do not know why, but the Unity. The Timeline. DLL code in the namespace is UnityEngine. The Timeline, I don't know why set in addition to the Engine), but UnityEngine. Time the assembly references cannot be or can't find the path. The following figure



Unity in the engineering Packages have Timeline package, version for 1.2.15. At this point, packaging process terminated by helpless.



Has done the following try, invalid and submit them to the fault of the same:

1, will Base. DLL with Unity. Timeline. The DLL file copy to Unity project Assets/Plugins directory, at the same time in the Timeline from PackageManager removed.

2, the Unity. The Timeline. DLL file renamed UnityEngine. Timeline. After the DLL VisualStudio to reference and recompile.
  • Related