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
1
Question by Max Designer · Jan 06, 2013 at 06:51 PM · videojava

How do i make a Video Intro at the start of a game using Java Scripting?

How to i make a video intro that show like some form of presentation like "A Unity Game" then "Powered By Unity" using the free version of Unity?

Comment
Add comment · Show 4
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 tomekkie2 · Jan 06, 2013 at 07:07 PM 0
Share

If you mean the WebPlayer embedded on the webpage, i would use the Javascript. I would define an additional video div and set the Unity div display to none and then switch that by "Send$$anonymous$$essage" after the game loads

avatar image AlucardJay · Jan 06, 2013 at 07:18 PM 1
Share

Unfortunately you cannot play videos in Unity Free, but there is a solution for playing a 'slide-show' that acts as a video : http://forum.unity3d.com/threads/100174-HOW-TO-Play-Videos-Without-Pro

but otherwise, from within Unity you need the Pro version : http://answers.unity3d.com/questions/40762/i-havent-pro-that-means-i-cannot-play-videos.html

You could always just use 'splash' screens : http://wiki.unity3d.com/index.php/SplashScreen

avatar image Max Designer · Jan 06, 2013 at 07:20 PM 0
Share

No i am talking in Unity, i use JavaScript to tell Unity to play this Video before loading the main menu or anything else...

avatar image Kiloblargh · Jan 06, 2013 at 07:42 PM 0
Share

You won't get far with this if you are unwilling to read.

2 Replies

· Add your reply
  • Sort: 
avatar image
2
Best Answer

Answer by smirlianos · Jan 06, 2013 at 07:39 PM

If you mean that you want an image to show BEFORE the pre-made unity logo that is showing before the game starts, you can't. But if you want it after that and before the first scene (scene 0) use this script. Put it on any game object and drag the png file you want in the inspector!

 #pragma strict
 
 // FadeInOut
 
 var fadeTexture : Texture2D;
 var fadeSpeed = 0.2;
 var drawDepth = -1000;
 
 private var alpha = 1.0; 
 private var fadeDir = -1;
 
 function OnGUI(){
 
     alpha += fadeDir * fadeSpeed * Time.deltaTime;  
     alpha = Mathf.Clamp01(alpha);   
 
     GUI.color.a = alpha;
 
     GUI.depth = drawDepth;
 
     GUI.DrawTexture(Rect(0, 0, Screen.width, Screen.height), fadeTexture);
 }
Comment
Add comment · Show 3 · 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 Max Designer · Jan 06, 2013 at 08:49 PM 0
Share

works great, how do i set more than one photo to display?

avatar image smirlianos · Jan 07, 2013 at 11:15 AM 0
Share

I'm afraid I don't know how to do this... But you can try to change scene automaticly when the first image fades out, and have the same script in the second scene as well with a different image in the inspector this time

avatar image AlucardJay · Jan 07, 2013 at 11:27 AM 0
Share

the links in my comment cover all this ....

avatar image
2

Answer by FL · Jan 06, 2013 at 07:25 PM

Create a scene with these text/image done by GUI and use a script like:

 var timeWait : float = 10.0; // Time for load the scene
 var sceneName : String = ""; // Name of Scene that will be load
 private var timeStart : float = 0.0;
 
 function Start(){
     timeStart = Time.time;
 }
 
 function Update (){
     if (Input.anyKeyDown || (timeStart+timeWait)<Time.time)
         Application.LoadLevel(sceneName);
 }
Comment
Add comment · Show 1 · 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 Max Designer · Jan 06, 2013 at 07:30 PM 0
Share

i don't understand, i want to use a video or if i can't use videos i want to use .PNG files to present it. Please explain?

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

13 People are following this question.

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

Related Questions

The name 'Joystick' does not denote a valid type ('not found') 2 Answers

Java for android script help??? 0 Answers

How use Streaming Assets and Handheld.PlayFullScreenMovie iOS? 1 Answer

A general script variable 3 Answers

How to add a script to a object in unity 1 Answer


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