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
2
Question by abhijeet1001 · Jan 08, 2015 at 10:43 AM · javascriptonline gamescripterror

merry fragmas part 2 PlayerNetworkMover Script errors

Hi there i am facing some problems i am trying to follow the tutorial step by step , i have unity 4.6 so stuff is bit different but understandable i face some tiny issues with scripts in character movement in part 1 but i managed it with almost no hard work but now in part to really having hard time the things mike disabled in the part 2 i cant find same things so i disable things i thght are the ones we need to disable like character control , first person controller etc etc , but when i try to make script so i can enable them and do

 GetComponent<FirstPersonController> ().enabled = true;


my intellisense doesnt shows anything and i even get error when trying to run it saying there is nothing like FirstPersonController ? please help also things like head bob isnt a different thing anymore its under firtperson controller so probably disable it and enabling it wuld handle head bob too right ?

Comment
Add comment · Show 9
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 kdubnz · Jan 08, 2015 at 11:24 AM 0
Share

Should that be FirstPersonCharacter ?? not FirstPersonShooter

avatar image abhijeet1001 · Jan 08, 2015 at 11:49 AM 0
Share

oh sorry corrected it

avatar image kdubnz · Jan 08, 2015 at 11:59 AM 0
Share

Was that the problem ? I had a look at the code posted on the same page as the video.

avatar image abhijeet1001 · Jan 08, 2015 at 12:30 PM 0
Share

no it doesnt solves my problem , the unity 4.6 has differnt gui stuff so i am not sure what to enable via script and what not to as in video mike disabled many stuff like head bob , mouse rotator , character controller , etc etc but i dont have same things like i cant find mouse rotator at all , i found character controller and a script FirstPersonController i can disable them but when i try to enable it via script it doesnt work if i try to get the script by doing

GetComponent{FirstPersonController}() ( added those { } cause wasnt able to post < in comment )

nothing shows up in intellisense while i am typing firstpersoncontroller nor it works in game and gives me compiler error if i just write that thing and save the script n try to play game

avatar image abhijeet1001 · Jan 08, 2015 at 07:16 PM 0
Share

@kdub also the video is of older version of unity ( slight old ) i have unity 4.6 and new sample assests so things are different

Show more comments

2 Replies

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

Answer by abhijeet1001 · Jan 10, 2015 at 02:14 AM

FOUND THE ANSWER oh god thank god my brain worked or else who wuld have helped me ~_~ this community is sleepy :v , wel for anyone who is stuck like i was use namespace

 using UnityEngine;
 using System.Collections;
 
 
 namespace UnitySampleAssets.Characters.FirstPerson{
 public class PlayerNetworkMover : Photon.MonoBehaviour {
 
 
     // Use this for initialization
     void Start () 
     {
         GetComponent<CharacterController> ().enabled = true;
         GetComponent<FirstPersonController> ().enabled = true;
         GetComponentInChildren<PlayerShooting> ().enabled = true;
 
 
 
         foreach(Camera cam in GetComponentsInChildren<Camera>())
             cam.enabled = true;
 
 //        transform.Find("Head Joint/First Person Camera/GunCamera/prop_sciFiGun_low").gameObject.layer = 11;
 
     }
     
     // Update is called once per frame
     void Update () {
     
     }
 }
 }
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 morpmorpmorp · Apr 07, 2015 at 06:27 PM 1
Share

Thank you Thank you Thank you

This has been frustrating me for weeks and I was ready to pack it in..

avatar image saurabh.saket · Apr 29, 2015 at 01:12 PM 0
Share

Oh thanks man. I was in the same situation as you were. Thanks for posting the solution. A big help. How you managed to do the "Character $$anonymous$$ovement", can you post the script for it? I am confused there.

avatar image MortePCAndVR · Jun 23, 2015 at 05:49 AM 0
Share

Thank you! Crosslinking back to forum with related info: http://forum.unity3d.com/threads/problem-with-merry-fragmas-part-2.311481/

The correct namespace to use depends on where you get the FPS Controller from - SA$$anonymous$$PLE Assets, or STANDARD Assets, or wherever...

I had to use namespace UnityStandardAssets.Characters.FirstPerson { for Unity v5.1 standard asset FPS Controller.

avatar image
0

Answer by wmadwand · Nov 30, 2015 at 03:21 PM

In addition, instead

 namespace UnitySampleAssets.Characters.FirstPerson

you can use

 using UnitySampleAssets.Characters.FirstPerson;

It works well in the same way. So you can choose what remedy to take in this case :)

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

7 People are following this question.

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

Related Questions

my gui text write over an over in a row 1 Answer

(c#)enemyHealth + playerAttack 1 Answer

How to use SHGetFileInfo in unity script to get an icon of a file 0 Answers

c# player move in Unity 1 Answer

BCE0053: Property 'UnityEngine.Component.light' is read only. 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