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.
318 questions
0
votes
1
answer
426
views
Understanding transform.forward vs. Converting World Space Forward to Local Space for Ray Drawing
I'm working in Unity and trying to visualize the forward direction of a GameObject. I came across two approaches:
Using transform.forward:
...
0
votes
0
answers
488
views
Developing a game in Chromebook OS
I’m trying to develop a game in my Chromebook OS. I can’t find any programming languages I can write in my Chromebook terminal. My terminal won’t take any new programming characters because every time ...
0
votes
0
answers
60
views
unity3D Angry bird orthographic 3d approach
i want to create a game like angry birds but in orthographic mode 3D .
i want to give the player the ability to Jump to the Red and Blue Platform (see the picture below) with the Click, Drag and ...
0
votes
1
answer
289
views
Actual Sizes of An Image loaded with a Path
I have a method which selects an Image from device. I need to show this image to users.
The codes below works fine, does what I need.
...
0
votes
1
answer
855
views
How to attach main camera to script component of a prefab?
So I have a prefab which is an item drop and a timer attached to the main camera. When the player collides with the item, I need the item to destroy then add time to the timer.
The itemdrop handling ...
0
votes
1
answer
408
views
Unity Bot AI behaviour
I'm working in Unity3d 2019.2.0f1 and I'm trying to make a chasing bot that follows a certain GameObject with the "Player" tag.
I'm not yet attempting a field of ...
0
votes
0
answers
42
views
Why does my "spawnedEnemies" variable not update when enemies are destroyed?
I'm creating a shooter game and I'm trying to update the current count of enemies on screen. When the laser hits an enemy, it is supposed to subtract 1 from the "spawnedEnemies" and then destroy the ...
0
votes
0
answers
21
views
NullReferenceException: Object Reference Not Set to an Instance of an Object (How is that so and I should I solve it?) [duplicate]
I am stuck several days because of this problem, which I am almost on the verge of giving up. (Using Unity Engine 2019.3a by the way). The TextButtonName.text can't read what TextButton is throwing to ...
1
vote
1
answer
417
views
unity 3d loading data from json problem
i am trying to practice on loading data from json files my problem is about when i try to load the sprite path from the json file to load the image icon from the floder that contain it, i manged to do ...
0
votes
0
answers
59
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
0
answers
41
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 ...
1
vote
0
answers
55
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
0
answers
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 ...
1
vote
0
answers
69
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
1
answer
525
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();
...
2
votes
0
answers
401
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 create ...
0
votes
1
answer
461
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 ...
2
votes
1
answer
4k
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 ...
1
vote
1
answer
600
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
1
answer
664
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
0
answers
141
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.
...
0
votes
0
answers
97
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 ...
1
vote
1
answer
2k
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
2
answers
286
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 ...
0
votes
2
answers
1k
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 ...