playMaker

Author Topic: Trouble creating prefabs  (Read 1395 times)

Gadget Gril

  • Playmaker Newbie
  • *
  • Posts: 1
Trouble creating prefabs
« on: August 01, 2014, 05:50:09 PM »
Hi, I've got something strange happening. I have a very simple state machine that is supposed to create a prefab at a certain location. I have two variables, both are game objects, one called newPrefab, and the other called SpawnPoint which refers to an empty gameObject when I want my prefab to spawn. Right now this is all my state machine does, because I figured I'd get this to work before adding more.

Here's the problem, when I play my game I get two instances of my prefab. One is right where I'd expect it to be, the other one is at origin and the sprite is cut in half along the Y axis.

Here's a picture of my state.


Lane

  • Administrator
  • Hero Member
  • *****
  • Posts: 2511
  • Mender of the past
    • Cleverous
Re: Trouble creating prefabs
« Reply #1 on: August 11, 2014, 12:37:59 PM »
Hey welcome to the forum, sorry for the delay getting a reply =)

Can you turn Debug on (checkbox on the bottom of the action stack)? It helps see whats in the fields.

Is newPrefab from the Project Hierarchy? Create Object only creates one object so its possible that you have either an object already in the scene that you're referencing or you are creating another object by some other FSM or script.
Products by Cleverous
|| Vault Core : Database
|| Vault Inventory : Multiplayer Inventory
|| Vault Attributes : Character Stats
|| That Hurt! : Dmg Floaties
|| Quinn : 3D