Make multiple objects renderer off
Hi, i've come into a problem of having to turn off the renderer of multiple objects. What I mean by that is i've downloaded a model and in the prefab there are a large amount of objects each with a...
View Articleif 4 objects touched the block it will be visible or unvisible
function OnCollisionEnter (collision : Collision) { //when the block have 4 objects touching the collision... if (collision.gameObject == 4) renderer.enabled = true; //the block will be visible or...
View ArticleMaking objects visible when nothings collide with it
I use these codes to make **"ArrowObj"** become visible when another game object collide with **"HelpStartBox"**, it works: public var ArrowObj:GameObject; function Start () { ArrowObj.renderer.enabled...
View ArticleCan you use renderer.enabled on array members ?
Hello I am a beginner so I'm not sure if this is possible. I am instantiating a column of cubes and I am trying to show / hide each member based on a value. Each member of the array is the same prefab....
View ArticleI am trying to create a togglable game menu using the ESC key
This javascript is men't to make a toggle game menu but when i press ESC nothing happens. I have tried other key combos as well. I am sure its something simple. Any help would be much appreciated....
View Articlerenderer.enabled working on PC but not android?
This is confusing me, I'm not quite sure what's going on. I'm trying to enable/disable the renderers of a set of child gameObjects. Testing it in the editor, it works perfectly. When I build it out and...
View ArticleHow do I make different gameobjects appear, every time you click the GUI.button?
To make my question more clear, I want it so that when you click the button in the middle of the screen, a picture comes up, then every time you click it a different picture comes up,at a random...
View ArticleTrying to make a renderer blink on and off, it's not working but I get no...
Here is my code: IEnumerator blinkTime () { if (blinking == true) { blinkTimeOn = true; while (blinkTimeOn == true) { renderer.enabled = false; yield return new WaitForSeconds (1f); blinkTimeOff =...
View Articlerenderer.enable = photon?
0n my objects I have included a script to enable/disable 2 points of weapons (sheathed and wielded) in the game, over the network when I press the corresponding button to enable/disable the mesh' all...
View ArticleKeypress.ismine?
how do I say "if I press the key, ALL clients should see MY player's change?" Photon RPC calls seem to affect my code in ways that appear to be close, but no cigars. using UnityEngine; using...
View ArticleSetting renderer.enabled to true does not render gameobject
I have a list of instantiated prefabs. A function is called that loops through them and for each gameobject that is not set to owner==1, its renderer is disabled. This part WORKS. The part that does...
View ArticleAccessing a Parent's PhotonID from a child's script
When I access my child object in question's renderer property, it affects all objects accessing the server that fall under the property of (isMine). When I update the child's renderer ALL client's...
View ArticleRequesting help with Time.time & Instantiate script.
Greetings So I want to instantiate an object after a certain time (4 seconds) and the code runs fine, no errors appear and I can execute the game but no object instantiates after the 4 seconds? Here's...
View ArticleCheck if a camera is looking at an invisible object
I know how to check if the renderer is visible, but I want to know if a camera is looking at an object WITHOUT a renderer enabled. I don't want an object to enable rendering when a camera is looking in...
View ArticleNo renderer.enabled=false on grouped GameObject
Hi everyone, if some of my Gameobjects are grouped in the hierarchy "GameObject.renderer.enabled = false;" is not working. I just want hide some objects if the mouse is over an object. Is there anybody...
View ArticleAccess renderer from transform
Hi guys, I have been trying to access the Renderer from a Transform that I have instantiated. The error is "Object reference not set to an instance of an object", and it appeared at the GridEnable and...
View ArticleHow to whrite in c# the code: onMouseEnter Hide mesh
Hi, I Am writing a code in c# here is what I have at the moment using UnityEngine; using System.Collections; public class MouseOver1 : MonoBehaviour { void OnMouseEnter(){ renderer.enabled = false; }...
View Articleplease need a littlebit of help with a ForceShield
Hey guys this script does not work propperly cn you help me? its attached to a sphere that simulates a force Shield. and my idea was to get the forseshield ony able to see when its been hit by my...
View ArticleNo 'Renderer' attached to the "Main Camera"
My Error Message I get at any frame (cause its in LateUpdate): "*MissingComponentException: There is no 'Renderer' attached to the "Main Camera" game object, but a script is trying to access it. You...
View ArticleRenderer.enable for GameObject[]?
Hello, I want to to do a renderer.enable = true/false for multiples GameObjects... But I don't know how to do it? GameObject[] doesn't have GameObject functions, so how I can do what I want please?...
View Article