Forum rules - please read before posting.

script error when Building a game

A custom made Action which I call
“DistanceCheck.cs” compiles without errors and has been working
for months, this Custom Action is almost a duplicate from your
tutorial sample. However when I Build it with File->Build it
reports this error:


Assets/MyTest/OtherActions/DistanceCheck.cs(59,38): error CS0115:
`AC.DistanceCheck.ShowGUI()' is marked as an override but no suitable
method fou
nd to override


and stops the Build.



Comments

  • edited January 2017
    ShowGUI() needs to be inside a #if UNITY_EDITOR block, as it's only available when running in the editor, not in final builds.

    So something like:

    #if UNITY_EDITOR
    override public void ShowGUI()
    // Actual code here
    }

  • Thanks a lot for the above, by the way my first installation game was also successful... in spite of the multiple seemingly useless files from Unity. My game is 4GB and it took 46 minutes to compile the installation with inno
Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Welcome to the official forum for Adventure Creator.