Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 13 Next capture
2021 2022 2023
1 capture
13 Jun 22 - 13 Jun 22
sparklines
Close Help
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
  • Asset Store
  • Get Unity

UNITY ACCOUNT

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account
  • Blog
  • Forums
  • Answers
  • Evangelists
  • User Groups
  • Beta Program
  • Advisory Panel

Navigation

  • Home
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
    • Blog
    • Forums
    • Answers
    • Evangelists
    • User Groups
    • Beta Program
    • Advisory Panel

Unity account

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account

Language

  • Chinese
  • Spanish
  • Japanese
  • Korean
  • Portuguese
  • Ask a question
  • Spaces
    • Default
    • Help Room
    • META
    • Moderators
    • Topics
    • Questions
    • Users
    • Badges
  • Home /
avatar image
0
Question by Bibbobbib · May 26, 2012 at 08:00 PM · animationfpsmenuproject

Animation is broken

Can anybody help me I'm trying to animate a player for my menu scene but the animation just plays to the first frame then it stops, I have clicked play automatically ect. The strange thing is, when I try the animation in my actual game scene it plays perfectly. If you need more info or a video go to the link below, I asked on another forum and they weren't able to help me

http://forum.armedunity.com/viewtopic.php?f=37&t=1226

Please help me, in till this is solved I can't continue making my game

Edit: so I have found what makes the animation play, the pause menu script. I eith want to make the script so it doesn't show GUI and locks the mouse or just take the part that makes it play.

Here is the code //@script ExecuteInEditMode() // script from     http://forum.unity3d.com/threads/74127- ... -PauseMenu     var skin:GUISkin; private var gldepth = -0.5; private var startTime = 0.1; var nativeVerticalResolution = 1200.0; var scaledResolutionWidth = nativeVerticalResolution / Screen.height Screen.width; var mat:Material; private var tris = 0; private var verts = 0; private var savedTimeScale:float; private var pauseFilter; private var showfps:boolean; private var showtris:boolean; private var showvtx:boolean; private var showfpsgraph:boolean; var lowFPSColor = Color.red; var highFPSColor = Color.green; var lowFPS = 30; var highFPS = 50; //var start : GameObject; var url = "WebPlayer.html"; var statColor:Color = Color.yellow; var GuiColor:Color = Color.white;   var credits:String[]=[       "Credits:",       "armedunity.com",       "bbb",       "aaa"] ;   var crediticons:Texture[];   enum Page { None,Main,Options,Credits }   var currentPage:Page; private var fpsarray:int[]; private var fps:float;       function Start() {       fpsarray = new int[scaledResolutionWidth];     Time.timeScale = 1.0;     PauseGame(); }       function OnPostRender() {       if (showfpsgraph && mat != null) {           GL.PushMatrix ();           GL.LoadPixelMatrix();           for (var i = 0; i < mat.passCount; ++i)           {               mat.SetPass(i);               GL.Begin( GL.LINES );               for (var x=0; x Screen.width;     GUILayout.BeginArea(Rect(scaledResolutionWidth/2 - (width/2), nativeVerticalResolution/2 - (height/2),width,height)); }       function EndPage() {       GUILayout.EndArea();     if (currentPage != Page.Main) {         ShowBackButton();     } }       / function IsBeginning() {       return Time.time < startTime;   }/           function PauseMenu() {       BeginPage(500,300);             if (GUILayout.Button ("Return to game")) {         UnPauseGame();     }       if (GUILayout.Button ("Options")) {         currentPage = Page.Options;     }       if (GUILayout.Button ("About")) {         currentPage = Page.Credits;     }       if (IsBrowser() && GUILayout.Button ("Restart")) {         Application.OpenURL(url);     }       EndPage(); }       function GetObjectStats() {       verts = 0;     tris = 0;     var ob = FindObjectsOfType(GameObject);     for (var obj in ob) {         GetObjectStats(obj);       } }       function GetObjectStats(object) {       var filters : Component[];     filters = object.GetComponentsInChildren(MeshFilter);     for( var f : MeshFilter in filters ){         tris += f.sharedMesh.triangles.Length/3;                 verts += f.sharedMesh.vertexCount;     } }       function PauseGame() {       savedTimeScale = Time.timeScale;       Time.timeScale = 0;       AudioListener.pause = true;       if (pauseFilter) pauseFilter.enabled = true;       currentPage = Page.Main;                 transform.position = new Vector3(0, 1, 0);         Screen.lockCursor = false; }       function UnPauseGame() {       Time.timeScale = savedTimeScale;       AudioListener.pause = false;       if (pauseFilter) pauseFilter.enabled = false;       currentPage = Page.None;           transform.position = Vector3.zero;         Screen.lockCursor = true; }       function IsGamePaused() {     return Time.timeScale == 0; }       function OnApplicationPause(pause:boolean) {       if (IsGamePaused()) {         AudioListener.pause = true;     } }

Comment
Add comment · Show 2
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image joemcd88 · May 27, 2012 at 04:50 PM 0
Share

You have to log in on that forum to view the topic - if you post the info & video link here in a comment (like this one) it'll be easier to say what's happening :-)

avatar image Bibbobbib · May 28, 2012 at 02:26 PM 0
Share

To much info to add, there's like 80 replies to this topic, the basic Idea is. There is something in my pausemenu script that makes the animation play. I either want to remove the GUI that it shows or take the part of the script that makes animations play. I can't post the script it's to long Ill try post above

0 Replies

· Add your reply
  • Sort: 

Your answer

Hint: You can notify a user about this post by typing @username

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

Follow this Question

Answers Answers and Comments

5 People are following this question.

avatar image avatar image avatar image avatar image avatar image

Related Questions

Reload FPS Animation Not Playing (Javascript) 1 Answer

Save information on Level Load HELP 1 Answer

Vector3.Lerp and Animations 0 Answers

How to make an Animation movement happen only after certain keyframes? 0 Answers

animating multiple weapons with 2 arms 0 Answers


Enterprise
Social Q&A

Social
Subscribe on YouTube social-youtube Follow on LinkedIn social-linkedin Follow on Twitter social-twitter Follow on Facebook social-facebook Follow on Instagram social-instagram

Footer

  • Purchase
    • Products
    • Subscription
    • Asset Store
    • Unity Gear
    • Resellers
  • Education
    • Students
    • Educators
    • Certification
    • Learn
    • Center of Excellence
  • Download
    • Unity
    • Beta Program
  • Unity Labs
    • Labs
    • Publications
  • Resources
    • Learn platform
    • Community
    • Documentation
    • Unity QA
    • FAQ
    • Services Status
    • Connect
  • About Unity
    • About Us
    • Blog
    • Events
    • Careers
    • Contact
    • Press
    • Partners
    • Affiliates
    • Security
Copyright © 2020 Unity Technologies
  • Legal
  • Privacy Policy
  • Cookies
  • Do Not Sell My Personal Information
  • Cookies Settings
"Unity", Unity logos, and other Unity trademarks are trademarks or registered trademarks of Unity Technologies or its affiliates in the U.S. and elsewhere (more info here). Other names or brands are trademarks of their respective owners.
  • Anonymous
  • Sign in
  • Create
  • Ask a question
  • Spaces
  • Default
  • Help Room
  • META
  • Moderators
  • Explore
  • Topics
  • Questions
  • Users
  • Badges