Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 12 Next capture
2021 2022 2023
1 capture
12 Jun 22 - 12 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 /
This question was closed Apr 07, 2016 at 04:48 PM by meat5000 for the following reason:

http://unity3d.com/learn

avatar image
0
Question by Balewa · Apr 07, 2016 at 07:58 AM · androidbuttonplayerprefs

How do I get the Play button to work?

This is my first time using Unity, I have created a 3D cube and put a spin script to it so it rotates in place. I went and clicked on the play button to see how it would work but on pressing the play button, nothing happens, no error message or nothing. What am I doing wrong? Please help.

Comment
Add comment · Show 5
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 centaurianmudpig · Apr 07, 2016 at 08:20 AM 0
Share

If you are running the project the Play button will be greyed out to show it is running, then chances are your script is not working as intended. Post the code for your spin script inside of the Code Sample tag (101 010 button ).

avatar image meat5000 ♦ centaurianmudpig · Apr 07, 2016 at 09:34 AM 0
Share

First it greys out, then when its actually playing the triangle goes blue.

avatar image Balewa · Apr 07, 2016 at 12:12 PM 0
Share

Hi guys thanks for the help but it appears its not about the script not working. Just having a cube without any script and pressing play, im still not getting the play window opening just to get a preview of what I have done. I have tried with other objects that I have brought in from maya but still the play button not playing anything even though I have not put any script to it. Im guessing I should still be able to press the play button and get a preview of my static object but thats not happening in my case. Please help.

avatar image meat5000 ♦ Balewa · Apr 07, 2016 at 12:12 PM 1
Share

Play windows wont open when you click play. your game simply runs in the Game window.

If you arent seeing anything, try repositioning the camera.

avatar image Balewa · Apr 27, 2016 at 08:30 PM 0
Share

$$anonymous$$eant to come back to you guys to let you know that I managed to get my animation working again. Thanks a lot guys for the help.

2 Replies

  • Sort: 
avatar image
2

Answer by meat5000 · Apr 07, 2016 at 04:34 PM

You are totally misconstrued as to what is supposed to happen there.

Pressing play in your Animation import Previewer is not indication of what will happen when you click the Game Play button. You must set up the animation components to utilise the animation clips. They dont just apply automatically.

Your play mode is fully functional and not broken at all.

The "Game" window is the actual game preview.

https://unity3d.com/learn/tutorials/modules/beginner/animation/animator-scripting

https://www.google.co.uk/search?q=unity+seting+up+animator&ie=utf-8&oe=utf-8&client=ubuntu&channel=fs&gfe_rd=cr&ei=qowGV9HkFMiEaL6cpKgD&gws_rd=ssl#channel=fs&q=unity+setting+up+animator

Comment
Add comment · Show 2 · Share
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 Balewa · Apr 07, 2016 at 05:40 PM 0
Share

Thanks for clarifying about the game window when I press the play button, I get that bit now. I still have the issue of my simple cube not spinning despite following a tutorial https://www.youtube.com/watch?v=2pgbUB$$anonymous$$nbtw (12:29) where he adds a cube and makes it spin. How would you do it if the way I have done it is wrong and also I have been getting some errors about the [VRDevice] initialization of device coculus failed, not sure what this is about. I have done another screen cast explaining this https://youtu.be/p21_U_u4yDE Thanks for the help, I really need it as Im working on a uni project that I need to incorporate all this.

avatar image meat5000 ♦ Balewa · Apr 07, 2016 at 06:13 PM 0
Share

As you have errors in your console it is possible your scripts may not compile at all. Follow the setup guide for your occulus. Clear all errors then try the answer below. Open the console window to see further errors.

avatar image
0

Answer by JigneshKoradiya · Apr 07, 2016 at 09:25 AM

create one script : name it ExampleClass and write following code now save it,now go to unity and select cube and now drag that script on inspector so it attach to cube and than press play button of unity it works:

using UnityEngine;

public class ExampleClass : MonoBehaviour {

 void Update() 
 {
     // Rotate the object around its local Y axis at 1 degree per second
     transform.Rotate(Vector3.right * Time.deltaTime*10);

 }

}

Comment
Add comment · Show 8 · Share
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 Balewa · Apr 07, 2016 at 10:45 AM 0
Share

Hi guys thanks for the help but it appears its not about the script not working. Just having a cube without any script and pressing play, im still not getting the play window opening just to get a preview of what I have done. I have tried with other objects that I have brought in from maya but still the play button not playing anything even though I have not put any script to it. Im guessing I should still be able to press the play button and get a preview of my static object but thats not happening in my case. Please help.

avatar image JigneshKoradiya Balewa · Apr 07, 2016 at 06:23 PM 0
Share

hi have you put animator on the object that you drag in hierarchy ?

avatar image Balewa JigneshKoradiya · Apr 07, 2016 at 06:29 PM 0
Share

No I havent, how do I do that? See the project I want to do is to bring in an animated object from maya as an FBX which I have done but when it comes to playing the animation in the game window, nothing happens. How do I fix this if it with this animator? All the other tutorials I have seen looked straight forward but just hasent been working for me. How do I do this?

Show more comments
avatar image Balewa Balewa · Apr 07, 2016 at 06:44 PM 0
Share

Ok, thanks guys. Ill get on it and see how it goes, thanks a lot for taking the time to respond to my issue. Ill let you all know how I get on. Thanks again.

avatar image Balewa · Apr 07, 2016 at 04:30 PM 0
Share

Im struggling guys the button still doesn't work. Here is a screen cast link at the bottom of whats going on, this might explain my problem better. Ido appreciate all the help, thanks again. https://youtu.be/Zc-LVXxr1Rs

avatar image centaurianmudpig Balewa · Apr 07, 2016 at 10:20 PM 0
Share

The bottom left windows (Game) is where the gameplay is, where you would expect to see your animation and game play out. The window on the right is an animation preview.

I have not dabbled with animations but you have to tell the game object to play the animation. Check out for more info: https://unity3d.com/learn/tutorials/topics/animation

Follow this Question

Answers Answers and Comments

6 People are following this question.

avatar image avatar image avatar image avatar image avatar image avatar image

Related Questions

Onscreen fire button for FPS games. 1 Answer

Not showing the message in the text field. 1 Answer

Divide the screen to a right and left button 1 Answer

how to add a basic share button android 1 Answer

PlayerPrefs in android 2 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