- Home /
Pause Menu Script Help?
Ok so i copied the javasript from here and made a new javascript for my game and named it pause menu. I added it to my main menu and tried going to the game view and got this error:
Assets/Pause Menu.js(52,44): BCE0005: Unknown identifier: 'SepiaToneEffect'.
How to fix?
Answer by Justin Warner · Jan 12, 2011 at 08:13 PM
Or, above all else, you can not copy peoples code, and actually hand code it and use it as an example, and code from it to guide you along your way like it's meant to...
The sepia effect is obviously used by the actual creator... And it's an easy fix, and it's probably in the first tutorial on Java programming that you look up to on Google/Youtube, but to be honest, I think you should learn the hard way rather than have others code for you...
I know this comment is old, but for anyone else that actually thinks like you.. hell with them!
We all started out somewhere, I myself wanted to get this asset because it's free, and I'm in a rush to get the game that I'm working on completed.
$$anonymous$$y next project would guide me to take more time and learn how to create my own "Advanced Pause $$anonymous$$enu", but for now, there is NOTHING wrong with trying to use a cool asset for an indie game.
Stop harassing people you dick!
Answer by Borgo · Jan 12, 2011 at 07:55 PM
It seens that you script refer to a variable named SepiaToneEffect but it's not declared first.
Or refer to a component (or script) that is not applied to your GameObject, in this case, make sure you are using the GetComponent() function and the component is applied to your gameobject.
UPDATE:
Here is the line of the your script:
pauseFilter = Camera.main.GetComponent(SepiaToneEffect);
You need to add a component called SepiaToneEffect to your main camera.
This effect only works on Pro version, to have access to this component you need to "Import package", go to your unity install folder and search for pro package:
C:\Program Files\Unity\Editor\Standard Packages\Pro Standard Assets.unityPackage
Hope this help you. Good look!
Answer by $$anonymous$$ · Jan 17, 2011 at 03:37 AM
You should be able to comment out that line.
I've started a thread on the Unity forum for general discussion on the pause menu script - http://forum.unity3d.com/threads/74127-UnifyCommunity-PauseMenu
Your answer
Follow this Question
Related Questions
Pause Menu select error 0 Answers
Pause Menu 3 Answers
hi i just got the ultimate fps camera and it is not compatible with pausemenus 0 Answers
Restart Problem 1 Answer