Quantcast
Browsing all 103 articles
Browse latest View live

How can I reference a prefab from within itself?

I have a GameObject with a bunch of children that is instantiated from a prefab. One of the children of that GameObject contains a reference to the prefab from which the parent was instantiated... at...

View Article


Assigning public game objects to a script associated with a certain game...

In a hierarchy, I have assigned pause Button and instructional keywords to public GameObject variables ins_kws and pauseBtn in a script associated with a panel Chp9_Screen1. Now the problem is that...

View Article


Suggestions for Prefabs which refer to other Prefabs

I understand that Unity3D does not support nested prefabs. While it confuses me as to why such support would not inherently be supported, I am willing to let that go and instead focus on how to achieve...

View Article

PrefabUtility.InstantiatePrefab not preserving prefab connection

This simple Editor tool to instantiate Prefabs is doing so, but the instantiated objects are missing their connection to the prefab (aka not blue, updating prefab doesn't show changes in copies)....

View Article

Unity Editor not finding assets after updating to macOS 10.13?

Yesterday, the developer beta for MacOS High Sierra was released, and after doing this update, I am no longer able to view any of my Unity assets, and all of the prefab connections/referenced scripts...

View Article


Object reference not set to an instance of an object (Scripts calling objects...

Right, I feel like despite the title of this question, it's a bit more in depth. Basically I have a pause menu which references various objects in the scene. It contains buttons which allow the player...

View Article

Setting the m_PrefabInternal property using the SeriailizedProperty System

Hello! I have a weird question regarding the Editor and I hope you can help me! I am loading GameObjects from a Database into the UnityEditor. I am storing and loading properties by using the...

View Article

Should I concern about RED objects in hierarchy view?

The game is running fine, and those RED objects I have in scene, are working perfectly.Should I concern if some of my scenes/levels have this "problem" ?

View Article


Can I stop the prefab connection of a gameobject during play?

Ok I'm making a FPS and I'm trying to make a script that will allow the player to pick up weapons off the floor. I do this by instantiating the weapon in front of the player and parenting the weapon to...

View Article


Pro, Free, SVN and Prefab Connection Problem

I'm experiencing a problem with my prefabs losing connections and becoming regular gameObjects while using Update within SVN on one of my machines and I'm hoping someone can shed some light. Here's my...

View Article

How can you duplicate a prefab and sever all links to the original?

I have a prefab set up (a single game object with various scripts and other components attached). I would like to create a second prefab that is identical to the first, except for the shader. What is...

View Article

Change Prefab Source/Change material on ALL prefabs in the scene

Hello everyone! I really hope someone can help me:) I have made an endless tunnel made out of different object. The player moves forward. By clicking I want to change these objects...

View Article

How to programmatically break prefab instance upon pressing Play

Is there a way to break a prefab connection in script when I hit the Play button (or when the game starts)? I'm using an asset from the asset store that does not work in play mode unless the connection...

View Article


Linking a prefab to another prefab in deep hierarchy using Inspector

I'm trying to figure out how to have some UI Screen Panels link to one another. I'm considering each screen to be a prefab, and then I've created a script that attaches on a button that will connect a...

View Article

Need a script... Search 3 Enemy objects and build MG

So hey there i looking for a script... so i will search 3 objects and when i have found it... the MG is buildet

View Article


PrefabUtility.ReplacePrefab overrides changes

Hi, I want to update a prefab programatically but somehow my changes get overwritten in the scene. When I delete a child transform in my prefabInstance in the scene and then try to update the prefab...

View Article

Loosing sprite association when transferring prefab

Hey, it is me again (GlobalGameJam forces me here today) We are currently trying to transfer some of the prefabs we build from one machine to another. A prefab in this case is a main object with some...

View Article


Creating prefab from instance of a GameObject loses materials

Hi everyone! I'm currently working on a project where we build a large world made of several tiles that I need to export in order to reimport them later on several distant devices. Each tile is made of...

View Article

Changing a broken prefabs terrain material

I'm starting to try to use prefabs and I have a problem. My prefab has a terrain in it with a simple texture. I can't seem to get only one individual instance of the prefab to change its texture to...

View Article

What does it mean to link prefabs?

I have read over some of the best practices regarding prefabs but it is all very wooly in the area around managing multiple prefabs via composition. So for example lets say you have a Player prefab,...

View Article
Browsing all 103 articles
Browse latest View live