Quantcast
Channel: Questions in topic: "javascipt"
Browsing all 1875 articles
Browse latest View live

Declaring XML Namespace at Runtime

Hi Unity Community! I’m trying to write a script to add nodes to an XML document at runtime however I am encountering issues when trying to define the name attribute of the new node; I would like to...

View Article


Script error to pick-up flashlight

Hi, sorry for my english but I'm italian. Ehm i created a script for pick-up a flashlight but there is 3 errors (some words are italian but you can understand) (there are 2 errors of)...

View Article


IOS Keyboard Save Text

Hello! I am making a game, and I need to pull up a keyboard, but I don't know how to save the entered text as a string. My code is: #pragma strict // Hides the keyboard if the device is facing down //...

View Article

Game got slow down On iphone

Hello guys, I developed a game which is slightly similar to "Angry bot" kind of game. My FPS on PC was 40 and works fine on web player when I built it. But while coming to iPhone game got slow down, no...

View Article

Network animations playing on all player models whenever any player moves.

I'm working on a multiplayer game and I have a animation manager that sends RPC's to all the players telling them to play the walking and idle animations on the player that called it, it's not working...

View Article


error CS0246: The type or namespace name `SerializedPropertyType' could not...

Assets/VolumetricLines/Scripts/Utils/ExposeProperties.cs(140,69): error CS0246: The type or namespace name `SerializedPropertyType' could not be found. Are you missing a using directive or an assembly...

View Article

How do i make a child not rotate with the parent. But i still want to be able...

I have an arm pointing towards the cursor attached to the player. When i turn around the arm inverts it's rotation(up = down, left=right). Does anyone know how to fix this. It has to be inside the...

View Article

Fast way to texture a 10km map?

Ok i got a 10km map from a height map that i made and im wondering if there is a faster way to paint textures. Like a script or something that paints rocks on slopes and sand for mesh that goes below...

View Article


How to make a camera move to a location and then stop using Java Script

Hi i'm trying to make a camera move to a location and then stop using java script. Here is my attempt at it. var speed : float = 0.2; var myPosition : float = 0; var myPos : boolean = true; function...

View Article


Array index is out of range.

Ok i assigned the script to the terrain and i get a error that says: "IndexOutOfRangeException: Array index is out of range. AssignSplatMap.Start () (at...

View Article

How can i fix/properly use this code ?

hello, i have been given two codes to implement a shield effect, this is that effect that is commonly seen in sci-fi series and movies, in which the shield (normally a bubble of plasma) only "reveals"...

View Article

make AI follow random waypoints

Hey guys, I have a script that makes my AI characters follow a waypoint system. I’ve also set up a trigger collider so that when they enter it they got to a random waypoint from a set list. The issue...

View Article

How is Vector3 used in javascript?

I'm not sure how you used vector3 in javscript. I have this line Vector3 movement = new Vector3 (moveHorizontal, 0.0f, moveVertical); but the console tells me to add a ; to the end. So I'm not sure...

View Article


Help converting a few lines of JS to C#.

I need help with this code. everything here seems to be NOT throwing errors, the one that shows the positioning of the "levelBar" is (the really long line) throws the error:...

View Article

compare variables JS

hello there :) var a : float = System.Math.Round(1.23987, 2); var b : float = System.Math.Round(1.241, 2); if(a == b); { Debug.Log(a+" = "+b); } if(a != b); { Debug.Log(a+" != "+b); } in log i can see...

View Article


Unity editor style camera script

Hi guys, I'm making a creation type game, and I want my in-game camera to behave exactly like the "camera" does in the editor. This means the following features: - Scrolling the middle wheel will zoom...

View Article

How can I change this java to C#

var GameObject TargetA; var GameObject TargetB; var float speed = 0.1f; function FixedUpdate () { var weigt = Mathf.Cos (Time.time * speed * 2 * Mathf.PI) * 0.5 + 0.5; transform.position =...

View Article


Z Rotation with Limits does not function properly.

I am creating a camera shake script that can rotate the camera on its Z-Axis, With limits of 3.0, And -3.0. The code does not execute properly for unknown reason, The problem occurring is the camera is...

View Article

Converting a mesh to terrain

How can i convert a mesh that is a terrain created in blender to a unity3D terrain without allowing unity to smooth out the terrain? i need it to be just as i exported it out of blender. Here is a...

View Article

Could I get some help updating this code to unity 5?

I am such a noob at coding and I was wondering how This code could be used in unity 5 var Distance; var Target : Transform; var lookAtDistance = 25.0; var attackRange = 15.0; var moveSpeed = 5.0; var...

View Article
Browsing all 1875 articles
Browse latest View live


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>