Stack Exchange Network

Stack Exchange network consists of 175 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

Questions tagged [unityscript]

STOP: this is probably not the tag you want. UnityScript is a deprecated language. For new questions about scripting in Unity, you probably want the tags "Unity" and "C#". Only use this tag for questions about legacy code written in UnityScript, the old JavaScript-like scripting language available until Unity version 2017.2.

0
votes
0answers
30 views

jump with chain, unity?

I'm making a jump like in the image, using the hinge join but when making the jump this tour for all sides, and when the character falls I can not make that on the axis of rotation x is 0 and equal in ...
0
votes
0answers
20 views

Getting Prefabs gameobjects with tags from folder

I have some problems. When I refreshedd codes or tags on projects. This code does not work. When I rechoose tags again on prefabs, it starts to work again. ...
0
votes
0answers
22 views

How to create Simple Click multiplayer test Game with photon

I am trying to create a simple multiplayer test sample with unity and photon but unable to do so. I am watching the tutorial and reading for 2 days. Now I know how to connect the player to a server ...
0
votes
0answers
22 views

Make players Rigibody move in direction its going?

I have my snowboard character which I am trying to fix the movement for. At the moment, The player is using transform.forward on the rigidbody to move forward. If my player turns around and faces up ...
0
votes
0answers
38 views

How can I deactivate and activate a button?

I have a code that keeps a gameObject between scenes, the theme is that this gameObjecte has as a child a button, which I can change the linerenderer color, besides changing the image of the button ...
0
votes
0answers
9 views

Issues with Flashlight Handle position with player rotation

I want the flashlight to look same while looking up and down as when looking straight. Normal Position for Hand and flashlight: Looking up and down, position is completely off: More images for ...
3
votes
1answer
99 views

Unity3d UnityWebRequest EscapeURL standard does not match Swift url encoding. How to decode it?

How should I decode escaped URL by unity in Swift? I am developing a game with Unity3d. Something MMORPG. With server implemented by me in Swift under ...
1
vote
0answers
24 views

Scene for Computer Screen

We are developing a scene that will involve heavily interacting with a "touch screen monitor" in the scene.. Because the workflow of the touch screen will need to be dynamic we are creating a REST API ...
0
votes
0answers
33 views

How to make mobile movement using CharacterController

How can i change my movement for mobile i think left and right gonna work but i don't know what should i do for jump ...
0
votes
0answers
20 views

NullReferenceException until tile is spawned [duplicate]

I have a tile and tile has enemies spawn positions, and spawner script in it. Everything works fine when tile is spawned, my ray hits the collider in tile and enemies get spawned, but my spawn script ...
0
votes
1answer
39 views

why is GetComponent<ICameraControl> returning null?

As you can see in the attached image below and the code, I have added a class that implements the interface ICameraControl attached to a ...
1
vote
0answers
26 views

Discrete line inside a 3D matrix

First of all a little premise: I'm following this tutorial on YouTube for procedural 2d cave generation in unity using cellular automata and I'm extending it in order to make caves in all three ...
0
votes
0answers
51 views

Unity Erase Image from mouse pointer

I want to erase the image for mouse pointer in unity. My pointer should be as a eraser. What is I do create the eraser? My sprite is always change because it provide from the server. Please help me.
0
votes
0answers
25 views

How simulate day/night transition on 2d game? [duplicate]

I'm trying to create a 2d game and I want to have a day/night transition, but i'm actually new on Unity and I don't know how to do it, I'm using this code, but give me error and I really don't even ...
0
votes
1answer
170 views

Custom shadow mapping in Unity. Works with preservative Light view but not with Orthographic

So about a week ago I decided to make my own shadow mapping technique in Unity based on my understanding of the whole thing. The entire experience was somewhat successful. I learned a lot and I get to ...
0
votes
1answer
50 views

360 degree Shooting using Pythagoras problem Unity 2D C#

I have used pythagoras to give the bullet a velocity in the bullet class. Velocity is applied when Instantiated(); ...
1
vote
0answers
31 views

How to implement a network proximity checker in Unity using LLAPI?

I'm trying to implement a network proximity checker using my own functions in Unity, using LLAPI. How can I implemnet a network proximity checker, with similar functionalities than the ones in the ...
0
votes
1answer
699 views

AdMob interstitial ads not showing after publishing in playstore

I have create a Unity game, 1st I add an AdMob interstitial ads script on game object then try on my main camera when I test in my mobile before publishing. It has worked like real time ads and ...
1
vote
0answers
55 views

Unity3D - How to create flat map render based on endless noise data

The Project I'm working actually on a Endless Map Generator (with chunks, height-map noise, threading system, etc..) This is actually what "dev data display" look like: The Goal Now I want to ...
2
votes
1answer
428 views

Random Range Without Duplicates

I have an array of gameobjects (some questions) if player hit some triggers a question from the array is displayed randomly, I want to avoid duplication of displaying questions. ...
0
votes
1answer
53 views

Unity - OnTriggerEnter & OnTriggerExit strange behavior

I am having a trouble with OnTriggerEnter with a lot of objects. I have a NavMeshAgent moving randomly throught the scene, then I have a sphere collider inside a children to detect nearby objects. If ...
0
votes
1answer
228 views

unity job system for 2d or more dimmension arrays?

I need to send a 2d array to a job system but execute function of IJobParallelFor just accepts one dimension. This is the example: ...
2
votes
1answer
630 views

Why can't we put GameObject's into a NativeArray and pass them to a Job?

I just started using the Unity Job System. It has a lot of limitations. You have to use NativeArray with it and NativeArray doesn't allow many types, notably GameObject's. It says there is a bug that ...
0
votes
1answer
282 views

unity play animations of model with C# without animation controller OR create animation controller at runtime entirely from script

I've been looking around for a while trying to figure out how to play simple animations with Unity via ONLY C# script, with no drag-and-drop involved. So far I've found various tutorials explaining ...
0
votes
1answer
248 views

Difference between Unity's Renderer.sharedMaterial and Renderer.sharedMaterials

What are the difference between Renderer.sharedMaterial and Renderer.sharedMaterials in Unity?
1
vote
1answer
75 views

how to put elements around circle with equal distance?

I know circle formula and know how to draw it. but I want put 4 points on it with equal distance from each other. how can I do that? I work with unity.
0
votes
1answer
23 views

make a unified image out of many sprites in unity

i made a customization character system that it has a seperate image UI for every part f body like eyes, hat, ears and... now i want to make a unified texture out of it to be able to save it as an ...
0
votes
1answer
256 views

Unity. Input in function for UI button OnClick

I am trying to create multiple selections for some items on my UI. To perform multiple selections of items I want a user to hold left control button. But then I add ...
1
vote
1answer
330 views

How to drag 2D objects and stop it if collides with other 2D object?

This is the code I am using but it's not working. It drags other object on collision: ...
1
vote
0answers
41 views

vSync for gameplay in monitor and VR headset in Unity not being consistent?

Following my previous question, I'm building a project, my monitor refresh rate is 60Hz, and in my project I have set my vSync value into 2 so I can get 30fps. ...
-1
votes
2answers
184 views

Unity bowling pins detection

I'am working on bowling ball game and I want to detect how many bowling pins has been knocked down by ball? What is the solution for this problem?
0
votes
0answers
23 views

Unity: camera moving up and down for no reason

I have a standard camera in my scene. With standard I mean the camera you get when you click right mouse > Camera, with no modification except for the transform position and rotation. Then I attached ...
2
votes
1answer
1k views

The value of VSync on vSync Count in Unity

In Unity, we can set the vSync value as "No sync" = 0, "Every V Blank" (60 fps) = 1 and "Every Second V Blank" (30 fps) = 2. But in the Unity Quality Setting documentation , it's written the vSync ...
0
votes
2answers
2k views

Unity Quaternion.LookRotation meaning

I've gone through Unity's documentation for Quaternion.LookRotation, but I didn't get the full understanding of how it works. What is the meaning of Creates a rotation with the specified ...
0
votes
1answer
320 views

Unity Bowling ball physics

I am working on Bowling Ball game for android. And I want the Bowling Ball to feel like a Bowling ball in the real world. I've already tweaked the Rigidbody values and PhysicsMaterial but it's giving ...
0
votes
1answer
325 views

Loop through multidimensional array in C#(Unity)

I have this data As you can see there's a 2nd board there. Now what i want is something like this PSEUDO CODE ...
0
votes
2answers
69 views

Showing Frame Rate Info in the Unity scene using Custom Script failed

I want to lock the framerate of my scene to 30fps, then I learned from this post that fps info in Editor Stat isn't reliable, that's why my fps is still around 100. This is my script for setting the ...
1
vote
1answer
518 views

Unity Input.GetMouseButtonDown(0) is not working

My code to detect left mouse click is not working Input.GetMouseButtonDown(0) and Input.GetMouseButtonUp(0). But same code for Input.GetMouseButton(0) is working. Code: ...
0
votes
2answers
1k views

Unity ScreenToWorldPoint always giving same coordinates with mouse position

I have a question about Unity's ScreenToWorldPoint. Whenever I use ScreenToWorldPoint(Input.mousePosition) and display the output in console this always gives me the same coordinates. MyCode: ...
0
votes
2answers
433 views

How to hide Game Progress Files saved in Application.persistentDataPath in Unity Android

I am developing a game that saves its state in a text file. I am writing that file in Application.persistentDataPath but my issue is that the game progress file is ...
0
votes
0answers
125 views

What's wrong in switching Script - Unity Multiplayer

I'm trying to switch between weapons but when I want to display another screen "some example" in client I don't see any change! This screenshot shows what I mean. [1] : https://imgur.com/uEUOFhC "...
0
votes
1answer
428 views

Difference between Unity's Camera.ScreenPointToRay and Camera.ScreenToWorldPoint?

What is the difference between Unity's Camera.ScreenPointToRay and Camera.ScreenToWorldPoint. And where we can use these. I've ...
0
votes
1answer
273 views

Unity navmeshagent and doors

I'm trying to make an agent patrol around a maze. The maze is proceduraly generated and consists of many rooms connected with doors. The problem occurs when the agent reaches a door. I wrote a script ...
0
votes
2answers
48 views

MonoBehavior Script that uses UnityEditor - Best practice for Location?

I've created a script which helps me auto-generate a GameObject prefab. It uses some UnityEditor, so it can't be used at runtime ...
0
votes
0answers
300 views

Save Generated GameObject as Prefab

I've written a script which will automatically generate a Mesh, assign a MeshFilter, MeshRenderer, BoxCollider, and RigidBody. This script is meant as a tool to rapidly create a certain class of ...
1
vote
2answers
588 views

is GameObject.Find() a bad idea even for one frame?

as I searched GameObject.Find and GameObject.FindwithTag are heavy to work with and for reall projects its better to find ...
2
votes
2answers
723 views

Objects' coordinates and scale adjustment according to different devices resolution and aspect ration in Unity

E.g I have a bunch of objects which are generated in specific coordinates. Let's say in a range of - 5 to + 5 on X axis. I came app with these numbers because of camera size I have in Unity editor. ...
1
vote
1answer
203 views

Object pooling with collisions in Unity

I am trying to create doodle jump like game with object pool for platforms. I have created an empty object with box 2D collider attached to it. This object moves with player and should be gathering ...
0
votes
1answer
658 views

Unity RectTransformUtility.ScreenPointToLocalPointInRectangle

What does the unity's RectTransformUtility.ScreenPointToLocalPointInRectangle do I've read unity documentation but I didn't get the clear meaning.