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 /
  • Help Room /
This question was closed Dec 02, 2017 at 09:02 AM by 1sd15 for the following reason:

The question is answered, right answer was accepted

avatar image
0
Question by 1sd15 · Jan 03, 2016 at 12:50 PM · script.newbiecutscene

Same Q as before but it has been a while and nones replyed so im reposting

Heres the latest issue: Im trying to make a cutscene, no errors yet when I use it, it disables movement but dose not switch cameras! Its bugging me :-/ Heres the code!

http://pastebin.com/hqKSEbx2

The reset I made I put in // as It was not working I think my IF is not done right :-/ Anyway please say if you know a reason why the cameras don't switch! Here is a pic of how I configured it to show I configured it right. : https://gyazo.com/813cbf5fb88df7a4bc1287b4adcb034f (I hope)

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

2 Replies

  • Sort: 
avatar image
0
Best Answer

Answer by 1sd15 · Dec 02, 2017 at 09:01 AM

Hey past me, I got an answer for ya!


So, if you are using Unity 5.0 or higher, to do this you need to use the ".SetActive" to change activity.
Here is a snippet of code that shows it in action:
if (CKeyCounter == 4) { TopDown.SetActive(false); FirstPerson.SetActive(true); }
So, to make an object disabled in the hierarchy, first get the object then set it to either (false) or (true) accordingly.
Hope this helps! Not the best report or answer I've done. Kinda rushing it. :P
So, this will disable the object you set it to in the Hierarchy, meaning it will be uncallable. Make sure you have a VAR or GameObject set to this object before you disable it, or you may have some issues. If you are using the old way of calling an object and not storing it, consider changing that.

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 jmonasterio · Jan 03, 2016 at 04:56 PM

Use camera.active instead of camera.enabled.

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 1sd15 · Jan 04, 2016 at 10:07 AM 0
Share

Still dosent work sorry

avatar image 1sd15 · Oct 25, 2017 at 01:49 PM 0
Share

Wouldn't it just be easier to disabled the object with SetActive()?

Follow this Question

Answers Answers and Comments

39 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 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 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

Player jumping issue 2 Answers

why do i keep getting compiler errors even though my script has no errors? 2 Answers

Is it possible to make an Okami Brush mechanic in Unity Engine? 0 Answers

Script + How to setup animator controller 0 Answers

How can resolve URL with caracter like & and other ? 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