unityscript

How can i change each gameobject movement speed?

与世无争的帅哥 提交于 2019-12-04 07:23:46
问题 In the Hierarchy i have 2 ThirdPersonController. In the Window > Animator i created new empty state called it Walk and set it to HumanoidWalk so when running the game both players are walking. On one of them i added the script and as Prefab the second ThirdPersonController(1). Then when running the game it's making clones of the ThirdPersonController(1). So i see in the Hierarchy more N ThirdPersoncontrollers. Today to change the speed of walking for each ThirdPersonController i change in the

Collision of object with player

≡放荡痞女 提交于 2019-12-04 07:11:53
问题 So I have a bit of an issue with some unity script (Another one, I've given up any interest of using unity outside of my required class projects). So I have a moving object, a ceiling to be specific, and I have it lower and 'crush' the player. However, it's not working. The ceiling moves, but nothing happens when it collides with the player. It used to work if the player was moving when it hit them but it isn't any more and I haven't changed any of the script so I don't know why that's

Collision Detection In Unity3D

此生再无相见时 提交于 2019-12-04 06:01:55
问题 I am working on 3D fighting game.I have two character with their animation.I have applied character controller and character controller script which i have customized. I have two button one to move farword and one to move backword..And four button to play different animation just like make a punch, hit a leg etc. Upto that its work perfactly fine. Now I have use capsule object with their capsule collider as a child of different bones. Like i have place one capsule object with their collider

Arabic input fields in unity

半世苍凉 提交于 2019-12-03 22:28:56
问题 Is there is a way to change the language of input fields in unity to Arabic?. I tried ArabicSupport and it displayed Arabic correctly but using it with input fields didn't work because GameObject.Find("input_field") .GetComponent<InputField>().text = Fix3dTextCS.fix( GameObject.Find("input_field").GetComponent<InputField>().text ); caused an error so, if I printed the input text elsewhere, it will appear correctly but how can I do it with the same input field? 回答1: input field is a little bit

Display live camera feed in Unity

谁都会走 提交于 2019-12-03 19:15:36
问题 I have a question regarding Unity. I hope this hasn't been answered before. I want to connect a Camera (like a HD cam) to my computer and the video feed should be displayed inside my Unity scene. Think of it like a virtual television screen, that displays what the camera is seeing in realtime. How can i do this? Google didn't point me in the right direction, but maybe I'm just unable to get the query right ;) I hope you understand what I'm going for. 回答1: Yes that certainly is possible and

How to set the font size of text in Unity?

别等时光非礼了梦想. 提交于 2019-12-03 03:17:01
How can I make the size of the font in a label larger? I used this function to display the text : function OnGUI() { GUI.color = Color.green; GUI.Label(Rect(500,350,200,50),"Lose"); } And that results in: How can I make this text bigger? Unity's GUI supports "rich text" tags now. http://docs.unity3d.com/Documentation/Manual/StyledText.html So this would work: GUI.Label(Rect(500,350,200,50),"<color=green><size=40>Lose</size></color>"); Simply create an appropriate GUIStyle and set the fontSize . Pass this to your label and you're good to go. So something like this: using UnityEngine; using

Why does Resources.Load <Sprite> return null?

跟風遠走 提交于 2019-12-02 22:02:11
My project has multiple sprites located in Assets\Sprites which I want to load using C# script. I have tested this: Sprite myFruit = Resources.Load <Sprite> ("Graphics_3"); But myFruit is still null. Jay Kazama Resources.Load will search for a directory in Assets/Resources . If you want to put it to Sprites directory then put it inside Resources (ex. Assets/Resources/Sprites ). Then you can just load it like this: Sprite myFruit = Resources.Load <Sprite> ("Sprites/Graphics_3"); Also make sure that you've set your image type to Sprite in the inspector. If you want to load multiple sprites, use

Collision of object with player

可紊 提交于 2019-12-02 13:37:16
So I have a bit of an issue with some unity script (Another one, I've given up any interest of using unity outside of my required class projects). So I have a moving object, a ceiling to be specific, and I have it lower and 'crush' the player. However, it's not working. The ceiling moves, but nothing happens when it collides with the player. It used to work if the player was moving when it hit them but it isn't any more and I haven't changed any of the script so I don't know why that's happening. My teacher had a suggestion on how to fix this but he wasn't specific enough on how to actually do

How to play news in TV when i switch on, using scripting language in Unity3D? [closed]

喜夏-厌秋 提交于 2019-12-02 13:35:00
I am new in unity3D. I need to know how can we play news in TV when i switch on using the scripting languages in Unity3D You might be interested in MovieTexture. Movie Textures are animated Textures that are created from a video file. By placing a video file in your project's Assets Folder, you can import the video to be used exactly as you would use a regular Texture. Video files are imported via Apple QuickTime. Supported file types are what your QuickTime installation can play (usually .mov, .mpg, .mpeg, .mp4, .avi, .asf). On Windows movie importing requires Quicktime to be installed. if

How can i change each gameobject movement speed?

我的梦境 提交于 2019-12-02 13:22:05
In the Hierarchy i have 2 ThirdPersonController. In the Window > Animator i created new empty state called it Walk and set it to HumanoidWalk so when running the game both players are walking. On one of them i added the script and as Prefab the second ThirdPersonController(1). Then when running the game it's making clones of the ThirdPersonController(1). So i see in the Hierarchy more N ThirdPersoncontrollers. Today to change the speed of walking for each ThirdPersonController i change in the Inspector the Move Speed Multiplier. But if i want in the script already when creating the clones to