RadicalCSG / Chisel.Prototype

Work in progress prototype for the Chisel Level Editor, for Unity
MIT License
465 stars 34 forks source link

ParallelWriter(Ext) Constructor Build Error #304

Closed BryanHaley closed 3 years ago

BryanHaley commented 3 years ago

With the ParallelWriterExt struct added in commit 38d7ff71173fba82ed126d3078fb8b0950b27503, this build error was introduced: Build error

Relevant code:

#if ENABLE_UNITY_COLLECTIONS_CHECKS
            internal AtomicSafetyHandle m_Safety;

            internal unsafe ParallelWriterExt(void* ptr, UnsafeList* listData, ref AtomicSafetyHandle safety)
            {
                Ptr = ptr;
                ListData = listData;
                m_Safety = safety;
            }

#else
            internal unsafe ParallelWriter(void* ptr, UnsafeList* listData)
            {
                Ptr = ptr;
                ListData = listData;
            }

#endif

This isn't triggered when doing play mode within the editor; only when trying to create a standalone build. I've tried building for both macOS (both Intel 64 and Intel 64 + ARM) and WebGL and got the same result both times.

System info: macOS Mojave, Unity 2020.2.0b11.3484, Mono with .NET Standard 2.0.

LogicalError commented 3 years ago

It took me a while to see why this was happening, but "ParallelWriter" should be "ParallelWriterExt" after the else Thanks!

BryanHaley commented 3 years ago

Ha, that thought crossed my mind but I guess I forgot to try it. Fixing that error revealed a couple more build errors, though. They all seem to be caused by forgotten if UNITY_EDITOR directives around code that references things that only exist in the editor. I managed to fix them all and get it building, so I've created a pull request for the fixes here.