我尝试一项一项去编译,如图所示的地方出现了问题,找不到DotNet命名空间
Hi @Ecmfknby , welcome to the community!
Are you following the developer setup instructions? See in particular the note at the end of the “Reinterop” section:
# Overview
This is a summary of the setup and workflows for developers who want to modify the Cesium for Unity plugin. If you just want to use Cesium for Unity in your own applications, see the main [README](../README.md).
## :computer: Building Cesium for Unity
### Prerequisites
* CMake v3.18 or later (the latest version is recommended)
* [.NET SDK v6.0 or later](https://dotnet.microsoft.com/en-us/download/dotnet/6.0)
* If you're using Visual Studio, you need Visual Studio 2022.
* No matter what compiler you're using, it needs to have solid support for C++20.
* Unity 2022.3+ (the latest version of the Unity 2022.3 LTS release is recommended)
* On Windows, support for long file paths must be enabled, or you are likely to see build errors. See [Maximum Path Length Limitation](https://learn.microsoft.com/en-us/windows/win32/fileio/maximum-file-path-limitation?tabs=registry#enable-long-paths-in-windows-10-version-1607-and-later).
* For best JPEG-decoding performance, you must have [nasm](https://www.nasm.us/) installed so that CMake can find it. Everything will work fine without it, just slower.
The built Cesium for Unity Assembly will run on much older versions of .NET, including the version of Mono included in Unity. However, these very recent versions are required for the C#<->C++ interop code generator (Reinterop).
To make sure things are set up correctly, open a command-prompt (PowerShell is a good choice on Windows) and run:
This file has been truncated. show original
I’ve checked all of my environments and they are basically in line with the requirements. The version of CMake is 3.31.1, the version of.NET SDK is 9.0.101, the version of Unity is 2022.3.50, the C++ language standard is C++20, and the support for long paths in Windows has been enabled. However, there’s one point that I might not have done correctly. When I executed the command “dotnet publish Reinterop~ -o.”, the result was like this. I’m not sure whether this has achieved the expected result or not.
Hello! Thank you very much for your answer. I’ve solved my problem. The reason was that I didn’t open Unity to compile the project.