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

how can i save my game scores without PlayerPrefs

hi there! im new to coding. i made a small game where you collect points. now i want to save the score. without using playerprefs. using js. how do i need to do this? thanks alot, kelvin

View Article


Android build error on line 70. Health is not apart of UnityEngine.Component.

#pragma strict var Effect : Transform; //var MuzzleFlash : ParticleEmitter; var MuzzleFlash : ParticleSystem; var DirtImpact : Transform; var ConcreteImpact : Transform; var FullAuto = true; var Damage...

View Article


Embedded HTML for Unity WebGL build

Hello all, I want show some web pages inside the unity view of WebGL build. I want to interact with the HTML page as well. Can anyone suggest a plugin which does this? Thanks in advance, Sujil V S

View Article

Having Trouble Incrementing an Integer

Hi, I'm trying to make a breakout clone using Javascript. There's an item that needs to add one extra life when the player collects it, but it's not incrementing right at all. It doesn't add one life...

View Article

Scrambling words using 2D array?

Hello! A while back I stumbled upon this great piece of open source code written by a developer which simulates the feeling of reading with dyslexia:...

View Article


I am getting this error in WebGL

I am getting this error WebGL: "An error occured running the Unity content on this page, See your browser's JavaScript console for more info. The error was: Uncaught SyntaxError: Unexpected token...

View Article

How to disable mouse lock in first person controller ?

I want to cursor be visible on pressing "2" key, I tried every script from internet, the only thing it worked is to make FirstPersonController dissabled, but that doesn't show me a cursor. function...

View Article

I am trying to enable multiple scripts from different objects that have the...

var varGameObject = gameObject.FindGameObjectsWithTag("Flashlight"); if(Input.GetKeyDown("e")) { for (var obj : GameObject in varGameObject) { obj.GetComponent.().enabled = true;...

View Article


addComponent c# script by java

hello there. trying to add c# script as component in java script #pragma strict public var obj : GameObject; public var mono : MonoBehaviour; function EnableFu**ingC () { obj =...

View Article


Javascript 2DRaycast help

Hi there, I'm working on a simple stealth game in unity2D, the very core gameplay will involve hiding from enemy sight as they look around. I'm relatively new to scripting and I've tried to find...

View Article

Need help in AI logic problem with multi target scenario!

Hi everyone there!! So i'm trying to make a fancy behaviour for my basic follow target AI. Well lets say that i'm trying to go forward with Ai behaviour development and still can't go beyond a basic...

View Article

How to use Analytics.CustomEvent?

Hi, I'm trying to set up my project with Unity Analytics (I'm in version 5.4.2, and using Javascript), and I've gotten stuck on using Analytics.CustomEvent. The documentation doesn't explain it too...

View Article

what is the code for clicking the game ojects in order to proceed in the next...

we a simple game and we don;t know the code. javascript code.. thanks.. #beginnerinUnity

View Article


I need to turn this C# to Js

I dont know about programming and I need to turn this C# to Js. using UnityEngine; public class Player : MonoBehaviour { // The force which is added when the player jumps // This can be changed in the...

View Article

I cant figure out why my array is causing the error 'System.Type' does not...

// JavaScript //my array of spawn point values var A1 = Vector3(20,0.05,0); var A2 = Vector3(20,0.05,-5); var A3 = Vector3(20,0.05,-10); var B1 = Vector3(25,0.05,0); var B2 = Vector3(25,0.05,-5); var...

View Article


FileNotFoundException: Could not find file build.asm.js

I've been trying to create a WebGL build for a test game, and everytime I do so the error log keeps bringing this up:> FileNotFoundException: Could not find file "D:\Stuff\Unity>...

View Article

Reset score to 0

I can't figure out what is wtong with my code, I wan't the score to reset when I collide with a specific tag but nothing happens? How can I do this with javascript. #pragma strict static var score :...

View Article


Changing a Variable from another script. JavaScript

So I'm trying to get a player to level up with XP. I have the xp needed and scaling in one script and detecting if a monster is killed as well. On the Monster script I have the damage the player does...

View Article

How to read URL parameters from Unity WebGL Build

I am building a browser based game targeting WebGL platform. Once I build my game into WebGL, I am getting an index.html file and gamename.js file (Ignoring other generated files as I assume they might...

View Article

My script keeps crashing my Unity Editor Client. Please help

So I created this script recently to spawn a "enemyPrefab" every x seconds. But when the function is called on my Unity client just crashes and I have to open up Task Manager and manually End Task it...

View Article
Browsing all 1875 articles
Browse latest View live


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