Quantcast
Channel: Questions in topic: "renderer.enabled"
Browsing all 99 articles
Browse latest View live
↧

Accessing 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 Article


Requesting 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 Article


Check 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 Article

No 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 Article

Access 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 Article


How 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 Article

please 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 Article

No '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 Article


Renderer.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


Cannot select Animation Event

I've copied an animation in order to make it R/W, added the component script below to the GameObject, then created an Animation Event. However, I cannot select my function (MeshState) from the list. It...

View Article

Making object "Blink"

Hello, I have a coin object that disappears after several seconds of hitting a ground. What I was thinking of doing was making it slowing "blink," eventually blinking rapidly then disappearing. Now, by...

View Article

Simple coroutine doesn't resume after setting renderer.enabled to false

Hello everyone, I'm trying to make a bonus that starts with a trigger and last for one second. I've made a coroutine for that. here's my simplified code. Here's what I get in the console : About to...

View Article

How to make a gameObject invisible in unity

I am attempting to make a Unity gameObject invisible through code. So far I have tried (On a script attached to the gameObject I want to make invisible): `this.renderer.enabled = false` `this.enabled =...

View Article


OnBecameVisible does not work

I am trying to optimize CPU usage for the game so I stop rendering when the object is out and render it again when it come back to screen. But the second part I can't get it to work. The Cat...

View Article

Make UI elements invisible

I need to make a UI button invisible, but not by the command SetActive(false) because I need a script on it to run. I tried below commands but none of them works, seems they are obsolete or wrong...

View Article


How to make a prefab active and non-active using script?

Hi. So I I have been so much trouble with this and it is making an prefab or object visible or not visible. I have tried using " GetComponent.enabled = true/false" But its not working. I bet I have to...

View Article

GetComponent ignoring if statement conditions

I'm trying to have objects become visible only when they fall within a particular area, however I'm having some trouble with GetComponent. foreach( Plank plank in planks ) { plank.CreateGameObjects();...

View Article


2D project - player respawn delay problem

Hello there! I making some simple 2D side-scroller. Because I'm noob in programming, all my C# scripts for small systems are based on GamesPlusJames tutorials (youtube). Problem starts when I want to...

View Article

Is it possible to start a game and get GUI-button act as like its already...

Hello, I have a problem because I've created two GUI-buttons that hides/disables and unhides/enables gameObjects renderer. And I need to second one act like its already pressed once when the game...

View Article

Children Mesh Render Issues.

I am attempting to turn off all of the child objects SkinnedMeshRenderers and I am using his script: var theObject : GameObject; function Update () { theObject.GetComponentsInChildren.().enabled =...

View Article
Browsing all 99 articles
Browse latest View live


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