Quantcast
Channel: Latest Questions by hardmode2236
Browsing all 112 articles
Browse latest View live
↧

Dictionary.TryGetValue for js

I'm trying to use a dictionary's TryGetValue in js, but i would need to pass a variable by reference. though it seems js cant use 'ref' or 'out' to pass by reference. line in questions is like this:...

View Article


object can't be null when highlighted in the inspector?

Long story short: I have an inventory system that works fine, until I highlight one of the slots in the inspector during run-time, thus, exposing the 'item' object in the inspector. My code checks for,...

View Article


javascript, default object comparator

i have a simple buff class and a generic list full of buffs. and i need to sort them but the [reference for the list's sort function][1] says: "Sorts the elements in the entire List using the default...

View Article

Emit Random Particles?

I have a particle system that doesn't emit anything, i only use it's emit() function at specific times to get bursts of particles. Is there any way to have it choose randomly between two different...

View Article

y and z rotation axis doing the same thing when x is 270 degrees

this has got to be the most annoying thing ever.... when the x axis rotates towards perpendicular with 0 degrees, the y and z axis become more and more similar until they do the same exact rotation...

View Article


raycast not detecting my mesh from blender

long story short, i imported a multipart mesh as a .blend file, i gave all its parts a rigidbody, mesh collider(convex), and a fixed joint to connect them all together. each individual peice is set to...

View Article

particle system stops normal emissions after .emit() is called

i have a particle system with an emission rate set to 3, its works up until i call its emit function with 25 particles. then it just stops, and nothing will turn its normal 3 emission back on except...

View Article

trouble getting all children into an array.

I'm trying to get all the children of an object into a Transform[] variable like so: #pragma strict var tiles:Transform[]; function Start () { tiles = gameObject.GetComponentsInChildren(Transform) as...

View Article


moving a transform by 10 but it goes exra...

this has me totaly stumped. im telling my camera to move down 10 like so: function initCam() { cam.transform.position.y = -10; } and for some reason when i test the app it goes from 0(its starting Y...

View Article


health bar position formula

I need a formula to position my health bar object as it scales down. i got close but i just couldn't get it right. i scale it down like so: transform.localScale.x = (maxSize*HP)/maxHP; Then on my next...

View Article

cannot access RectTransform variables from a script

how do i manipulate a RectTransform's variables from a script? variables like the height, right padding, left padding. when i try to change its height i just get an error saying height isn't a member...

View Article

particle array null refrence

I'm just messing around trying to add some external effects to my particles(particle attraction in this case). but it seems my particle array isn't being filled, or something is going wrong when i try...

View Article

moving a disabled particle system that's set to distance emission

no matter how hard i disable this particle system it still emits particles in a line when i move its transform. heres my code: function load() { boltParticles.emissionRate=0; // try to stop it from...

View Article


importing google play game services with javascript

iv been following this video tutorial: https://www.youtube.com/watch?v=XmHXl-UFTqM iv followed it to the letter up until 12:21 and everything works nice when i follow his instructions with a C# script,...

View Article

detecting when admob interstitial ads are closed

Is there some function being called when the ad closes that i don't know about? for instance: when my users close the ad i need them to go to another page, where would i put that code to switch pages?

View Article


google play services: picking a random user?

is there a way, using google play services, to pick 1 random user of the app; based on a given area (in my case the entire united states). and maybe put some filters on, like, people who agreed to...

View Article

UI elements not animating colors

I have some UI elements in my scene (a couple UI.Texts and a UI.Image). they are all controlled by one animation, they have keyframes for movement, and color changes. They move as intended, but, their...

View Article


using array functions on a string?

is there a way to use the array functions on a string, such as push, pop, shift, and all that? i tried to convert from string to char[] but it that doesnt work. i'm making a text adventure styled game...

View Article

optimizing a forest.

So i'm trying to make a forest and iv been looking into combining the various tree meshes into one, but then i heard someone say something like: once they are combined, they will all want to render...

View Article

rich text issue

i'm working with a UI.text element and i have the rich text checked, but i'm using a little function that types out strings character by character with a little pause inbetween. I wanted to color code...

View Article
Browsing all 112 articles
Browse latest View live


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