Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 13 Next capture
2021 2022 2023
1 capture
13 Jun 22 - 13 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 Jblovekim · Sep 01, 2014 at 03:04 AM · variablesdatabase

How do I switch variables without touching the codes

Our professor wants us to learn how to create an app for small business, companies or anyone so they require us to create a program and treat the admins of that business as computer illiterates and it's up to us to find out a way so the admins can still update our software after we give them the product

I'm sorry if my question confuses you guys, I don't know how to rephrase my question correctly but here's what I plan to achieve:

I'm creating a simple house with 5 rooms, let's call them 1,2,3,4,5. Now sometimes this room switches from:

alt text

to

alt text

What my plan is: Create a script generator, i'll create the diagram above and let the admin access it and place where he wants the rooms and press the generate button, a script is then printed that changes the variables from the previous one to the new one, here's the process:

  1. Admin uses script generator

  2. Places rooms where he seems fit

  3. Press generate

  4. Copies generated code to the blank script named "update" located in the project

  5. Build and Runs the Program

Pros: Lets them edit the rooms

Cons: If they want to edit the places again, the script generator they will use will still show them the default places (and this can be tiresome if ever there are 50 rooms and at the first change they changed 30 rooms and the next change they need to edit only 2 rooms but they will also need to edit back those 30 rooms again)

Another possibility is the utilization of databases (or so I think), however I have no experience in this and I would like to know if this is even possible.

(Important)

What I posted above is just the concept of the problem, but if you wanna know what program I will be doing, here it is:

I'll be creating a building with 10 rooms, while in-game you can access the map and mini map (small map in the upper right kinda like the ones in flyff). You can see the room's names there and by clicking the doors of the rooms, a popup box appears with the information of the room, now what I plan to achieve is to change the names of the rooms in the map and the popup box information with what the admin generates within the script generator.

I'm really sorry if my choice of words are confusing you guys I don't know how to explain them properly

1.png (2.1 kB)
2.png (2.0 kB)
Comment
Add comment · Show 4
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 SnotE101 · Sep 01, 2014 at 07:35 AM 0
Share

Do you want to save the variable data into another variable?

avatar image Woj_Gabel_FertileSky · Sep 01, 2014 at 07:48 AM 0
Share

Do you need to generate the code just for that? You can just make that feature as an in game options, with some enums in GUI, or generate array of rooms on the fly.

avatar image Jblovekim · Sep 01, 2014 at 12:16 PM 0
Share

@SnotE101 For example the room 1 has a door, and let's say there is a variable named "room1", room1 will contain the info that will popout when you choose to click room 1's door while you're in the game. To make shifting rooms easier, I'll also let room1 handle the map's visual display, I'm really sorry but i'll create a diagram to explain it further but i'm at school at the moment.

@Sedesikus Yeah I need to exchange variables without touching the codes since the ad$$anonymous$$s who'll use it will be treated as computer illiterates, so the solution I thought of was to create a code generator, and the generated codes will switch the variables and the ad$$anonymous$$'s job then is only to copy that code and paste it in the project's blank script named "updates" and build/run the project.

avatar image supericecream · Sep 01, 2014 at 12:20 PM 0
Share

In your case, you seem to need an entire parser for your program, since Unity doesn't support scripting (that's your code) on top of scripting (generated code) by it self.

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.

Follow this Question

Answers Answers and Comments

5 People are following this question.

avatar image avatar image avatar image avatar image avatar image

Related Questions

Updating variables from dictionary database in edit mode C# 0 Answers

How to pass SQL vars? 1 Answer

Database and transferring variables 1 Answer

Update mySQL at game runtime ??? 2 Answers

Unity3d and Database and MultiPlayer Games 1 Answer


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