Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 12 Next capture
2021 2022 2023
1 capture
12 Jun 22 - 12 Jun 22
sparklines
Close Help
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
  • Asset Store
  • Get Unity

UNITY ACCOUNT

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account
  • Blog
  • Forums
  • Answers
  • Evangelists
  • User Groups
  • Beta Program
  • Advisory Panel

Navigation

  • Home
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
    • Blog
    • Forums
    • Answers
    • Evangelists
    • User Groups
    • Beta Program
    • Advisory Panel

Unity account

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account

Language

  • Chinese
  • Spanish
  • Japanese
  • Korean
  • Portuguese
  • Ask a question
  • Spaces
    • Default
    • Help Room
    • META
    • Moderators
    • Topics
    • Questions
    • Users
    • Badges
  • Home /
avatar image
0
Question by elia-demarco · Sep 02, 2017 at 02:45 PM · prefabplaymakerreferenceslost

Playmaker prefab issue

Good afternoon, here I am, again, with another problem, this time using playmaker. I set up a very basic enemy, which, depending on the tag given to the FPS, will give two "effects", one will damage and the other will increase the bar of life points, and then destroy itself. I used the collider of the enemy as a trigger, (a cube), then take the information from the slider (Get and Set Property) and set it up after the damage / restore. So far it's all right, but when I do an enemy prefab, and close Unity, this will lose references, so I have to set it all up. I'm sure I miss something, please, what it is?

Thanks in advance.

Comment
Add comment
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

2 Replies

· Add your reply
  • Sort: 
avatar image
1

Answer by justDeek · Sep 02, 2017 at 06:06 PM

@elia-demarco

Get Property and Set Property use local references which shouldn't be used in Prefabs (because they are designed to be portable and dismiss any local references), so you have to use variables and pass information at runtime either inside the same FSM or through Global Variables, Prefabs / save files (like text, xml, json, ...).

Example: alt text

That Game Object "Main Camera" won't get transfered over if I would make a prefab out of the GameObject with this FSM while this: alt text

works if I feed the variable "mainCamera" with a GameObject at runtime (even though in this case the variable "mainCam" would be renderer useless but it's just to show the difference).

But you can however use local references if you make an instance of that prefab and insert your local references afterwards; it's just not the recommended approach but would still work.

Only if you press 'Apply' on your instance the local references won't get transfered over to other instances and if you create instances at runtime you can't use local references inside the prefab.

BTW PlayMaker also has an active Forum with a 'Help' section, where you'd have more luck getting answers on such topics than here. (http://hutonggames.com/playmakerforum/index.php)


no.png (17.9 kB)
yes.png (18.3 kB)
Comment
Add comment · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image
0

Answer by elia-demarco · Sep 03, 2017 at 01:34 PM

I see, I'll store informations via globals and see what happen, I really appreciated your explanation, simple and clear, you even include images for example, thank you very much. I'll check Hutong forum for future issues with playmaker.

Comment
Add comment · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

Your answer

Hint: You can notify a user about this post by typing @username

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

Follow this Question

Answers Answers and Comments

85 People are following this question.

avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image

Related Questions

Prefab's lost!or is it there? 1 Answer

[Solved][Kinda?]Missing folders and files 1 Answer

Script Default References vs. Object Variable References? 1 Answer

How can i assign prefab to transform without drag & drop from project to inspector 1 Answer

All links in the prefab are broken when exported 3 Answers


Enterprise
Social Q&A

Social
Subscribe on YouTube social-youtube Follow on LinkedIn social-linkedin Follow on Twitter social-twitter Follow on Facebook social-facebook Follow on Instagram social-instagram

Footer

  • Purchase
    • Products
    • Subscription
    • Asset Store
    • Unity Gear
    • Resellers
  • Education
    • Students
    • Educators
    • Certification
    • Learn
    • Center of Excellence
  • Download
    • Unity
    • Beta Program
  • Unity Labs
    • Labs
    • Publications
  • Resources
    • Learn platform
    • Community
    • Documentation
    • Unity QA
    • FAQ
    • Services Status
    • Connect
  • About Unity
    • About Us
    • Blog
    • Events
    • Careers
    • Contact
    • Press
    • Partners
    • Affiliates
    • Security
Copyright © 2020 Unity Technologies
  • Legal
  • Privacy Policy
  • Cookies
  • Do Not Sell My Personal Information
  • Cookies Settings
"Unity", Unity logos, and other Unity trademarks are trademarks or registered trademarks of Unity Technologies or its affiliates in the U.S. and elsewhere (more info here). Other names or brands are trademarks of their respective owners.
  • Anonymous
  • Sign in
  • Create
  • Ask a question
  • Spaces
  • Default
  • Help Room
  • META
  • Moderators
  • Explore
  • Topics
  • Questions
  • Users
  • Badges