Quantcast
Channel: Questions in topic: "prefab connection"
Browsing latest articles
Browse All 103 View Live

Prefab Path Issues

I'm currently having an issue in my project where some of my objects appear to lose their prefab links when I change the absolute path of the project. As in, my project was previously at...

View Article



Break Prefab Instance does not work in Unity 5.3.2.f1

Hello, I'm trying to create 2 similar prefabs, let's say a blue block and a red block. I have created the red block, added some scrips and a shader with red color. Now I need a new block just like this...

View Article

Instances of the same prefab behaving differently

I am currently working on a dungeon game, in which the main enemies are skeletons. I have created a prefab with all the colliders, animator, script, etc. on it, but now it is not really working. By...

View Article

Making random map, how to do this well?

Hello, I'm actually making a "Isaac-like". I made a script who load all the map in my prefabs and then instantiate them with a procedural generation. I think this part is ok. But my problem come from...

View Article

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

Unity Programmatically Link Prefab

Let's say I have 5 different enemy prefabs. I won't know until runtime which prefab I want to be spawning. I know that normally I can make a `public GameObject` variable that I can link to a script....

View Article

prefab: can you exclude a variable from beign tracked?

**Can I exclude the scale of a prefab instance from being tracked?** Unity already allows prefab instances to have independent rotation and position, can I exclude the scale likewise? **An example:**...

View Article


How to make prefab reference in another prefab

I want to create a game GUI prefab to use it in another levels. Simultaneously, GUI prefab contains buttons, that are prefab instances too. When I save GUI prefab and then change button prefab, nothing...

View Article

Model as Prefab - lots of this prefab causing problems

Hi there! I have a problem. I have made a Keypad/Keylock Model with GUI in WorldSpace and Script on it. I have made a prefab with this Gameobject/Model. If i use one of this prefab in the scene...

View Article


Patterns for reusing, inheriting from, or extending GameObjects or Prefabs.

Problem ------- I have a GameObject with a number of scripts attached. I've designed the GameObject to be a 'base' object for moving entities in my game. The scripts handle things that will be common...

View Article

Where to begin on construction simulator: How do I allow the player to snap...

Title. I want to start off simply. The first feature I want to implement will allow the player to snap prefabs together. How would I best accomplish this?

View Article


Unity Freezing with for loop and prefab referencing

My main objective is to spawn some prefabs objects every couple of seconds from another prefab and have the spawned prefab travel to a set destination. I am using invokeRepeating to spawn them every...

View Article

State could not be found, despite having a State with that name.

Hi, I've been doing research, and it seems like no one has this exact problem. If this is a repost, I'm very sorry! I have a script that I want to play an animation from attached to a prefab. Even...

View Article

Force every prefab to be the same for every scene

Let's say I have a project with 50 scenes. Those 50 scenes (scene #1, scene #2... to scene #50) all contain a complex Prefab, called CommonPrefab. I wish to have the same 50 prefab in all 50 scenes. So...

View Article

Getting "Failed to Unpersist" Errors that are Destroying my Scenes!

Hi there! I'm having a bizarre bug in the editor when I try to play a scene that is deleting many of the scene files, even when I exit play mode. This is slowing me down by huge amounts, as the only...

View Article


Restore a backed up project - Prefab Connections

(For TLDR please jump to last section where my questions are.) I tried to restore one of my backed up projects (just in case of a hazard scenario.) I was backing up (copying the folder) Assets,...

View Article


Unity: How can you make a prefab immutable for instance overrides

How can I make a component not result in an instance override generation like the alignment components (Position, Rotation, Width, Height)? Is there a hidden attribute that is applied to the Transform...

View Article

Linking a Prefab as Variant to Another Prefab After Creation

Hi guys, I have three prefabs: A, B and C. B was a variant of A until I unpacked prefab B. I have created C as a variant of B. A -/-> B --> C I now changed my mind and want to revert the...

View Article

Prefabs won't change?

So I'm trying to make all of my prefabs to turn off their renderers and others turn into triggers, but the prefab changes but the in-game objects linked to the prefab does not. Here are some lines that...

View Article


GameObject doesn't load ammocounter prefab from FPS microgame (Unity 2018.4.18)

So I have created an FPS game using the FPS Microgame kit by Unity as a starting point. However, I have come across a problem with their ammocounter prefab. The idea is to have a weapons HUD manager...

View Article

Add prefabs randomly, endless runner

Hey, I'm making an endless runner. I made some prefabs which are pieces of the map spawning randomly ( to have a different map each game). My problem is that I can't figure out how to place the...

View Article

How to safely delete a prefab?

This may seem a dumb question, but how do I delete a prefab making sure it doesn't break anything? I have a project full of clutter and I am trying to clean it up. I took for granted that if I delete a...

View Article

,How do I connect a game object prefab to a TextMesh Pro text box?

What I am trying to accomplish is to have some text boxes in a side panel on the screen display information about the currently selected (or mouse overed) game object. In all of the solutions I have...

View Article



Prefab clone not updating

So I have multiple Prefabs in my scene that are supposed to spawn each other during runtime. Therefore, I created a script on them that manages them. However, if I assign the public variables of type...

View Article
Browsing latest articles
Browse All 103 View Live




Latest Images