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).
How to Build (Windows MSVC)
- Open Developer Command Prompt for VS.
- Navigate to this directory.
- Run:
cl /LD /O2 /EHsc BackroomsNoise.cpp /Fe:BackroomsNoise.dll - Copy
BackroomsNoise.dllto theAssets/Plugins/folder in Unity.
How to Build (Cross-platform with CMake)
- Create a
CMakeLists.txt:cmake_minimum_required(VERSION 3.10) project(BackroomsNoise) add_library(BackroomsNoise SHARED BackroomsNoise.cpp) - 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.