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 /
avatar image
0
Question by petrv-filipp · Sep 15, 2015 at 04:11 PM · animationcamerascript errorattached

There is no 'Animation' attached to the "Camera" game object, but a script is trying to access it.

public var welcomeLabel : GUIStyle; //http://habrahabr.ru/post/113859/ var mySkin : GUISkin; // Переменная для настроек цветов и пр. в редакторе var showButton = false; //Для кнопки - не используется var b_display : boolean = true;// Для бокса var animation_bool : boolean;// Для анимации function Update() { if(animation_bool == true) { GetComponent.().Play("Animation2"); } }

//Функиция окна function OnGUI ( ) { if (b_display)//Показывает все { // Связать скин, для использования GUI.skin = mySkin; //Для анимации //Задний фон кнопок GUI.backgroundColor = Color.white; // Окно с текстом GUI.Box (Rect (5,5,740,415), "Согласно Боевому уставу, главе 3, п.67:"); //Просто текст, без окна GUI.Label (Rect (20,40,700,200) , " Построение и действия у боевых машин производятся по командам (сигналам), подаваемым при помощи флагов или голосом. Для привлечения внимания экипажей подаётся команда (сигнал): 'ВНИМАНИЕ'. По этой команде (сигналу) экипаж прекращает движение, шум, разговоры и, оставаясь на месте, поворачивается лицом к командиру. Для сбора и построения экипажей у машин подаётся команда (сигнал): 'К МАШИНАМ'. По этой команде экипаж выстраивается впереди машины в установленном порядке и принимает положение 'Смирно'.");
GUI.Label (Rect (20,150,700,200) , " Для посадки экипажей в машины подаётся команда (сигнал): 'ПО МЕСТАМ'. Для заводки моторов подаётся команда (сигнал): 'ЗАВОДИ'. Для выхода экипажей из машин подаётся команда (сигнал): 'К МАШИНАМ'. Если нужно распустить экипаж, подаётся команда: 'РАЗОЙДИСЬ'. По этой команде экипаж поворачивается направо, переходит на правую (по направлению движения машины) сторону дороги и расходится."); //A - количество пикселей от левого края экрана к левому краю окна. //B - количество пикселей от верхнего края экрана к верхнему краю окна. //C - ширина окна. //D - высота окна. showButton = false; //Кнопка "Далее" if (GUI.Button (Rect (520,375,180,30), "Далее")) { b_display = false;// Перестает показывать все окна, текст и.т.п. showButton = true; animation_bool = true; }

    }
 if (showButton) 

{ if (GUI.Button (Rect (520,375,180,30), "ПО МЕСТАМ"));

}

} function OnMouseUp (){ if (showButton == true) { GetComponent.().Play("Animation2"); }

}

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

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

30 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

Related Questions

Animation has bug soon i add a third person camera 0 Answers

Fancy camera animation but still follower player? 0 Answers

I can't see my First Person Controller 1 Answer

Only two of my animation frames display? 0 Answers

Set camera position to end animation camera position? 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