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 Murmur · Sep 07, 2013 at 04:17 AM · list of listshackingminigame

Trying to make a hacking minigame...

So I am trying to make a hacking minigame where you can access files on computers in the game, but I can't figure out the best way to make a "file structure" on the computers. I'd like to have multiple directories with different files in them that can be accessed, edited, and deleted. I'm just not sure on the best way to get the whole thing started, I don't think using lists would work as some directories would have files and other directories in them. Any ideas?

Comment
Add comment · Show 3
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 RyanZimmerman87 · Sep 07, 2013 at 04:50 AM 0
Share

Well the file directory doesn't actually have to be a functional file directory right, it's just part of the game? So you are simulating the file directory in the game play?

You might need a more experienced programmer to answer this kind of thing depending on how crazy/realistic you are going for.

Right now if I was just going to randomly jump into something like that I would use OnGUI() for all the buttons(buttons would simulate how to access the folders/text fields/etc) and from there call functions to update the data. So the OnGUI() would simulate the computer system visually and you would use separate functions to actually handle their input in the folders and to manipulate the data if there are certain objectives they are going for.

Not sure how helpful that will be it seems like if you are trying to program something like this you would already be leaps and bounds above what I just suggested in your understanding of how to set it up.

avatar image Benproductions1 · Sep 07, 2013 at 12:37 PM 0
Share

Classes and Lists... it's as simple as that

It's quite easy to replicate the structure of a file system.

avatar image ArkaneX · Sep 07, 2013 at 01:06 PM 1
Share

Take a look at this question. You'll find some ideas there.

1 Reply

· Add your reply
  • Sort: 
avatar image
2
Best Answer

Answer by vexe · Sep 07, 2013 at 01:56 PM

Woot! what a happy coincidence, I happen to be doing the VERY SAME THING! - But I think I'm a little bit ahead of you ;-)

Cutting, (I didn't need copying, but it's just as easy) pasting, renaming, opening files/folders, text/audio/video/image files, go back, navigable addressbar, scrolling, deleting, recycle bin, multiple selection, unique naming, etc :D

I'm gonna probably make this available at the store after we release our game.

But if you wanna do this in a way that is easy, and convenient like the way I did it, then first you gotta get NGUI. Learn the basics from Michael (ArenMook), then it's smooth sailing from there :) - And don't forget to make an account at NGUI's forums, you WILL need a LOT of help at the beginning.

alt text

The rest is all pure programming and organizing code and class design, I hope you're good at OOP. If you're only willing to make a file manager (just like like you see in the pics, not a whole OS like what I think I'm gonna be doing), then you could have classes like:

 FileManager:
    RootFolder
    CurrentFolder
    RecycleBin
    FolderStack (for going back)
    Clipboard
       Cut();
       Copy();
       Paste();
    ...

 FolderContent:
   background
   icon
   label
   Open();
   Delete();
   Rename();
   MoveTo();
   ...
   ^     ^
   ^     ^
   FILE  Folder
         List <FolderContent> Contents
         List <FILE> Files   // keeping a list of files and folder for convenience and easy access
         List <Folder> Folders
         GetFile(string fileName, bool recursive);
         GetFolder(string folderName, bool recursive);
         GetUniqueName(string forName);
   ...
    ^     ^
    ^     ^
    ^     RecycleBin
    ^        RestoreAll();
    ^        DeleteAll(); // Clear it out - destroys contents completely
    AudioFIle, TextFile, VideoFile, ImageFile, etc

(Arrows mean children - inheritance)

(Here's how I implemented the Clipboard I used a queue, but you could use a list if you like)

You're gonna need a couple more stuff. Sorry I'm not giving details. But if you so decide to go and get NGUI, let me know and I will be more than happy to help you, and even share some code :) But that doesn't mean that you don't try yourself first.

Doing this in UnityGUI is really a pain in the butt! Don't even think about it!

There are a lot of quirks and gotchas in NGUI and headaches in the beginning, but once you get it right, NGUI isn't just a GUI system, it will offer a LOT of powerful tools, like a brand new event handling system. It will help you solve problems in much better and efficient ways than UnityGUI.

Good luck!


filemanaer.png (231.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

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

19 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

Related Questions

How can I launch a game inside another "game"? 1 Answer

Is it possible to display a List of GameObject List in a Custom Inspector? 1 Answer

Hack prevention 1 Answer

Is there a better way for randomization for triggering a percentage of the time 1 Answer

Game hacking questions. 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