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 SwirlyBitz · Mar 22, 2015 at 11:12 AM · audiofpsgraphics

How to add a subtitle to my game

Hi guys! please teach me on how to add a subtitle to my first person game that will appear when a voice audio is played. Thank you

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 SwirlyBitz · Mar 21, 2015 at 09:56 AM 0
Share

Actually im stuck at the very beginning on putting a subtitle. Im trying to use text mesh and when an audio file is played, the text mesh will setActive, but im wondering if theres a better way to make a subtitle to put inside the game.

avatar image SwirlyBitz · Mar 23, 2015 at 03:33 PM 0
Share

Thank you :)

2 Replies

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

Answer by Digital-Phantom · Mar 22, 2015 at 11:19 AM

Probably the easiest way is just create your subtitle in something Paint / Photoshop.

Drag that image into unity as a texture.

Make a plane, add the texture to it.

Add a sound source to the plane object, attach your speech audio file.

Then simply instantiate the plane in front of your main camera/player and you are good to go.

Then just destroy the object once the audio has finished.

(repeat this as many times as you need with as many subtitles as you like)

:)

Comment
Add comment · 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
0

Answer by DiegoSLTS · Mar 22, 2015 at 12:14 PM

I'd do it using the UI features of Unity instead of a Text mesh, you have more control over the text's shape and position.

But I guess you're in the right direction, I can't think of anything simpler than displaying a Text game object when an audio clip is played.

You probably need some script that handles all the audio clips and the subtitles to display and hide the text when the audio starts or stops. You probably also need to synchronize more than one subtitle for one clip if the audio is long. Each subtitle for an audio clip could have it's length.

The idea of making the subtitles as a texture looks really bad, you'll need a texture for each subtitle. Using a Text component you only need the text for each subtitule, and set the current one as the Text component's text.

Comment
Add comment · 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

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

3 People are following this question.

avatar image avatar image avatar image

Related Questions

Play Audio from different Object 1 Answer

Using PlayerPrefs to save settings menu 2 Answers

How can I speed up getSpectrumData for visualization of audio on mobile? 1 Answer

FPS audio problem 1 Answer

How Would I Create An (FPS RPG)? 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