[Unity]Solution for common issues
Keywords: Unity, Solution for common issues
failed to open source file: ‘Packages/com.unity.render-pipelines.xxx’
Error at compiling assets:
Shader error in 'XXX': failed to open source file: 'Packages/com.unity.render-pipelines.lightweight/ShaderLibrary/Core.hlsl' at line 72 (on d3d11)
Render pipelines were missed in project, e.g. you created a project using
Create a project using
LWRP template or
High Definition RP template, these two templates provided new render pipelines.
[LWRP] UPGRADING LWRP PACKAGE TO 7.0.0 BREAKS FORWARDRENDERDATA ASSET IN RESOURCE FILES
Assets go pink
Assets in scene go pink (purple).
1, Materias and shaders of assets were missed.
2, Materias and shaders of assets using old render pipeline which not support in new verson.
Retarget materias and shaders in meshes or update materials and shaders.
everything became pink
Error CS0246: The type or namespace name ‘float2’ could not be found
Error at building project
error CS0246: The type or namespace name 'float2' could not be found (are you missing a using directive or an assembly reference?)
Missing requisite package.
Install Mathematics: Windows -> Package Manager -> Select
Mathematics and click
Visual Studio Related
An assembly with the same simple name ‘SyntaxTree.VisualStudio.Unity.Bridge’ has already been importe
Error log in editor console:
error CS1704: An assembly with the same simple name 'SyntaxTree.VisualStudio.Unity.Bridge' has already been imported. Try removing one of the references (e.g. 'D:\Program_Filesx86\Microsoft Visual Studio Tools for Unity\16.0\Editor\SyntaxTree.VisualStudio.Unity.Bridge.dll') or sign them to enable side-by-side.
Error log on compiling project in Visual Studio:
error CS0234: The type or namespace name 'UI' does not exist in the namespace 'UnityEngine'
- Close Editor and Visual Studio.
- Remove file
C:\Program Files(x86)\Microsoft Visual Studio Tools for Unity\16.0\Editor\SyntaxTree.VisualStudio.Unity.Bridge.dll.
- Remove files
.csprojand remove directories
- Reimport project and open Editor and Visual Studio.
It is not a lack of love, but a lack of friendship that makes unhappy marriages. ― Friedrich Nietzsche, Twilight of the Idols