VeriorPies / ParrelSync

(Unity3D) Test multiplayer without building
MIT License
4.47k stars 314 forks source link

[RESOLVED] Compiler error in Unity build #102

Closed Keepps closed 1 year ago

Keepps commented 1 year ago

Describe the bug Compiler error when building project in Unity if referring to ParrelSync.ClonesManager. Compiles fine in the Editor.

To Reproduce Steps to reproduce the behavior:

Put this in code and build the project in Unity:

        if (ParrelSync.ClonesManager.IsClone())
        {
            Debug.LogWarning("Foo");

        }

Expected behavior Should compile when building.

Enviroment (please complete the following information):

BTW this is other amazing, huge timesaver. Thanks!

314pies commented 1 year ago

Hi Keepps, It looks like you are missing #if UNITY_EDITOR flag to exclude ParrelSync from your build (ParrelSync should be editor only)

Example code snippet: https://github.com/VeriorPies/ParrelSync/wiki/List-of-APIs#clonesmanagerisclone

Keepps commented 1 year ago

Aha! Many thanks.