update
This commit is contained in:
30
Assets/Plugins/Native/BackroomsNoise/README.md
Normal file
30
Assets/Plugins/Native/BackroomsNoise/README.md
Normal file
@@ -0,0 +1,30 @@
|
||||
# BackroomsNoise C++ Plugin
|
||||
|
||||
This native plugin provides high-performance noise generation for the Backrooms map system using **FastNoiseLite**.
|
||||
|
||||
## Files
|
||||
- `BackroomsNoise.cpp`: C wrapper for Unity P/Invoke.
|
||||
- `FastNoiseLite.h`: The noise library (ensure you have the full version from [GitHub](https://github.com/Auburn/FastNoiseLite)).
|
||||
|
||||
## How to Build (Windows MSVC)
|
||||
|
||||
1. Open **Developer Command Prompt for VS**.
|
||||
2. Navigate to this directory.
|
||||
3. Run:
|
||||
```cmd
|
||||
cl /LD /O2 /EHsc BackroomsNoise.cpp /Fe:BackroomsNoise.dll
|
||||
```
|
||||
4. Copy `BackroomsNoise.dll` to the `Assets/Plugins/` folder in Unity.
|
||||
|
||||
## How to Build (Cross-platform with CMake)
|
||||
|
||||
1. Create a `CMakeLists.txt`:
|
||||
```cmake
|
||||
cmake_minimum_required(VERSION 3.10)
|
||||
project(BackroomsNoise)
|
||||
add_library(BackroomsNoise SHARED BackroomsNoise.cpp)
|
||||
```
|
||||
2. Build as usual.
|
||||
|
||||
## Usage in Unity
|
||||
The `NativeNoiseProvider.cs` script will automatically attempt to load `BackroomsNoise.dll`. If it fails, it will fall back to Unity's built-in `Mathf.PerlinNoise`.
|
||||
7
Assets/Plugins/Native/BackroomsNoise/README.md.meta
Normal file
7
Assets/Plugins/Native/BackroomsNoise/README.md.meta
Normal file
@@ -0,0 +1,7 @@
|
||||
fileFormatVersion: 2
|
||||
guid: ebf9d2e10b290754b8cae46ebb44cbb0
|
||||
TextScriptImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
Reference in New Issue
Block a user