• 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 mkristo · Sep 19, 2017 at 09:35 PM · prefabunityeditorprefabssavingprefab-instance

"Change" Prefab Component Attributes

Hello everybody,

I am working on this about 10 hours now and don't get it. I am trying to make a management program to set up the prefabs attributes before initializing them afterwards.

I made a dropdown menu for selecting the different texutres in the resources folder which works fine. Just the "apply" does not work really. Gameobject g = Resources.Load("Prefab") as GameObject;

g.GetComponent().setTexture = images[dropdownMenu.value];

Please Help me!

Comment
Add comment · Show 2
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 FortisVenaliter · Sep 19, 2017 at 10:08 PM 1
Share

What about the "apply" doesn't work?

avatar image mkristo · Sep 20, 2017 at 09:21 PM 0
Share

Well, images are located in Resources folder and should be applied from the management programm to the main program. It works now fine i also automatically rebuild the main program after pressing save in management so the prefabs are added to the new build of my main program. The problem is I just can select images when i am in my management programm in the scene. I want to be able to build the management programm which reads from a certain file location images and applies them to the assets/resources/myPrefab.prefab Is this possible?

0 Replies

· Add your reply
  • Sort: 

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.

Welcome to Unity Answers

The best place to ask and answer questions about development with Unity.

To help users navigate the site we have posted a site navigation guide.

If you are a new user to Unity Answers, check out our FAQ for more information.

Make sure to check out our Knowledge Base for commonly asked Unity questions.

If you are a moderator, see our Moderator Guidelines page.

We are making improvements to UA, see the list of changes.



Follow this Question

Answers Answers and Comments

86 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 avatar image

Related Questions

Link GUIText to a prefab? 2 Answers

Zombie is working fine but it's prefab is creating issue in animation in unity,Zombie is working fine but it's prefab is creating issue in animation in unity Ask Question 0 Answers

Problem: Random Instantiating more than one prefab? 1 Answer

Prefabs won't change? 1 Answer

Making multiple instances of a prefab,Instantiating multiple instances of a prefab 1 Answer

  • Anonymous
  • Sign in
  • Create
  • Ask a question
  • Spaces
  • Default
  • Help Room
  • META
  • Moderators
  • Explore
  • Topics
  • Questions
  • Users
  • Badges