Home
User Manual
Contents
1. void Success long requestID string localFilePath handle the downloaded file here void Warning long requestID string warning 30 Boxit Functions handle the warning here void Progress long requestID float progress handle the progress here Perhaps with a progress bar or some other visual aid dy 7 4 UploadFile Description Uploads a file to the Dropbox server long UploadFile ROOT root string localPath string remotePath SuccessDelegate lt 9 5 MetaData gt success FailureDelegate failure null ProgressDelegate progress null bool overwriteRemote true string parentRev null string locale null Parameters e ROOT root The root relative to which path is specified Valid values are Boxit ROOT sandbox and Boxit ROOT dropbox e string localPath The path to the file on the local device This path is relative to the application s persistent data path working directory e string remotePath The path to the file on the Dropbox server This path is relative to the root specified e SuccessDelegate success Delegate that is called when the procedure completes This delegate will have a 9 5 MetaData result with the properties of the uploaded file e FailureDelegate failure optional This delegate is called if the procedure fails If no delegate is supplied Boxit will output to Unity s error log Default null UploadFile 31 e ProgressDelegate progress optiona
2. Parameters e ROOT root The root relative to which path is specified Valid values are Boxit ROOT sandbox and Boxit ROOT dropbox e string fromCopyRef The 9 9 CopyRef of the file to be copied This can be obtained by calling 7 10 GetCopyRef e string toRemotePath The path to the file where the file should be copied on the Dropbox server This path is relative to the root specified e SuccessDelegate success Delegate that is called when the procedure completes This delegate will have a 9 5 MetaData result of the file s final location e FailureDelegate failure optional This delegate is called if the procedure fails If no delegate is supplied Boxit will output to Unity s error log Default null e string locale optional Use to specify language settings for user error messages and other language specific text Click here for a description of the locale value Default null Returns long value representing the Boxit request ID This is useful for debugging purposes in the case where you have many requests running in parallel Usage CreateFolder 45 Boxit BoxitClient client void Awake client CopyFileFromCopyRef Boxit ROOT sandbox AkK250Ht2eGhneHJ3NnpONg Remote Path Folder A logo png Success void Success long requestID Boxit 9 5 MetaData metaData handle the metaData here 7 14 CreateFolder Description Creates a folder on the Dropbox server O it you nest folders they will
3. This function saves you from having to download a file then delete the remote file then re upload to a new location It is much faster and saves a lot of bandwidth long Move ROOT root string fromRemotePath string toRemotePath SuccessDelegate lt 9 5 MetaData gt success FailureDelegate failure null string locale null Parameters e ROOT root The root relative to which path is specified Valid values are Boxit ROOT sandbox and Boxit ROOT dropbox e string fromRemotePath The path of the file or folder to move on the Dropbox server This path is relative to the root specified e string toRemotePath The path of the file or folder to move to on the Dropbox server This path is relative to the root specified e SuccessDelegate success Delegate that is called when the procedure completes This delegate will have a 9 5 MetaData result of the file or folder s final location e FailureDelegate failure optional This delegate is called if the procedure fails If no delegate is GetDelta 49 supplied Boxit will output to Unity s error log Default null e string locale optional Use to specify language settings for user error messages and other language specific text Click here for a description of the locale value Default null Returns long value representing the Boxit request ID This is useful for debugging purposes in the case where you have many requests running in parallel Usage Boxit BoxitClient c
4. ROOT root string localPath string remotePath SuccessDelegate lt DateTime gt success FailureDelegate failure null ProgressDelegate progress null Parameters e ROOT root The root relative to which path is specified Valid values are Boxit ROOT sandbox and Boxit ROOT dropbox e string localPath The path to the file on the local device This path is relative to the application s persistent data path working directory e string remotePath The path to the file on the Dropbox server This path is relative to the root specified e SuccessDelegate success Delegate that is called when the procedure completes This delegate will have a DateTime result that stores the current time stamp of both the local and remote file e FailureDelegate failure optional This delegate is called if the procedure fails If no delegate is supplied Boxit will output to Unity s error log Default null e ProgressDelegate progress optional This delegate is called as the procedure runs giving an update to the progress incrementally between zero 0 and one 1 0f If no progress delegate is specified then nothing will be sent back to the application Default null Returns Nothing This is a multi step procedure that makes several calls asynchronously so no request ID is known at the time of the call Usage Boxit BoxitClient client void Awake client SyncFile Boxit ROOT sandbox Local Folder A test txt test txt Suc
5. When the user comes back to your application Boxit assumes that the user has successfully logged in otherwise you will get an error when Boxit requests the Access token from Dropbox 6 2 Unlinking In the rare case where your user requests to be unlinked from Dropbox you can call the Unlink func tion in the Boxit client This will remove the Access keys from the player prefs associated with the app key and secret Any future Boxit requests will be denied until the user links to Dropbox again Unlink Function Description Deletes the Access token from the user s player pref s effectively disconnecting the application from Dropbox void Unlink Parameters None Returns No Return Usage 24 Linking and Unlinking Boxit BoxitClient client void Awake client Unlink 7 Boxit Functions 7 1 GetAccountinfo Description Retrieves the account infomation for the logged in user long GetAccountInfo SuccessDelegate lt 9 3 AccountInfo gt success FailureDelegate failure null string locale null Parameters e SuccessDelegate success Delegate that is called when the procedure completes This delegate will have an 9 3 AccountInfo structure with the data from Dropbox e FailureDelegate failure optional This delegate is called if the procedure fails If no delegate is supplied Boxit will output to Unity s error log Default null e string locale optional Use to specify lan
6. Description Creates and returns a 9 8 ShareLink to files or folders users can use to view a preview of the file in a web browser The difference from 7 9 GetMedia is that this does not bypass the Dropbox webserver used to provide a preview of the file You cannot stream files with this link GetShareLink 37 long GetShareLink ROOT root string remotePath SuccessDelegate lt 9 8 ShareLink gt success FailureDelegate failure null bool shortUrl true string locale null Parameters e ROOT root The root relative to which path is specified Valid values are Boxit ROOT sandbox and Boxit ROOT dropbox e string remotePath The path to the file or folder This path is relative to the root specified e SuccessDelegate success Delegate that is called when the procedure completes This delegate will have a 9 8 ShareLink result e FailureDelegate failure optional This delegate is called if the procedure fails If no delegate is supplied Boxit will output to Unity s error log Default null e bool shortUrl optional When true the url returned will be shortened using the Dropbox url shortener If false the url will link directly to the file s preview page Default true e string locale optional Use to specify language settings for user error messages and other language specific text Click here for a description of the locale value Default null Returns long value representing the Boxit request ID
7. account or sign in First name Last name Email Password l agree to Dropbox Terms Create account After you create the account Dropbox will download the program to your machine This is not required to use Boxit but is a nice tool You can now go to your home by clicking on the Dropbox logo in the upper left Figure 2 3 Go Home 5 Dropbox 3 Create a Dropbox App Before you can use Boxit you will need to have a developer App set up in your Dropbox environ ment This is only necessary for developers and is not required by the users of your application O 1 you already have an app set up you can skip this chapter 3 1 Create an App To get to the developer section of Dropbox click on the arrow next to the link at the bottom left of the page Then click on the link Figure 3 1 Developers Install Mobile Blog EE Jobs y Developers AF Contact us Pricing Copyright Language Help Privacy More a Createan App 5 In the developer section click on the My Apps link Figure 3 2 My Apps I Developer blog Ly My apps 3 Getting start 3 Core concepts N Setup Authentication Files and folders 4 Reference Development kits REST API Best practices Branding guide Terms and conditions If you don t have any apps yet you will see the Create an App button Click on this Figure 3 3 Create an App Creating an app grants you access to the Dropbox A
8. graphics etc You won t be locked up while the file downloads uploads or requests are processed Sometimes these requests can take a long time so this lets you run your code in parallel It can be tricky to code your application in an asynchronous environment so caution must be exer cised so that you don t try to process information that has not been received ES See 8 Advanced Syncing for more information on how to sync your data in an asynchron ous environment 5 3 Delegates Each Boxit function can have one or more delegates that are called when the procedure completes fails or is in progress SuccessDelegate Description This function is called when the Boxit procedure has completed successfully The result type depends on the function being called For instance 7 2 GetMetaData will return a 9 5 Delegates 15 MetaData structure whereas 7 1 GetAccountInfo will return an 9 3 AccountInfo structure void SuccessDelegate long requestID lt T gt results Parameters e long requestID The request ID assigned to the procedure The requestID is just the current date time in string format This value helps in debugging where multiple requests might be running in parallel e lt T gt results The results type will vary among the functions returning data relevant to whatever is being called Returns Nothing is returned by a SuccessDelegate Usage Example 1 Boxit BoxitClient client void Awak
9. where multiple requests might be running in parallel e float progress The progress of the procedure This value will be between zero 0 and one 1 0f Returns Nothing is returned by a ProgressDelegate Usage Boxit BoxitClient client void Awake client DownloadFile Boxit ROOT sandbox test txt Local Folder A test txt Success null null Progress 20 Asynchronous Functions void Success long requestID string localFilePath handle the downloaded file here void Progress long requestID float progress handle the progress here perhaps with a progress bar or some other visual aid Le 6 Linking and Unlinking 6 1 Linking Before your application can access your Dropbox folder you have to link the app This only needs to be done one time Once an app is linked it will connect to Dropbox automatically with the stored Access keys O Anytime you create a new Boxit client in your scenes Boxit will remember your linked Access keys for the App Key Secret pair so you don t need to link your app in each scene just once for the whole application Linking Function Description Links your application to a user s Dropbox account long Link SuccessDelegate lt 9 2 oAuthToken gt success FailureDelegate failure null Parameters 21 22 Linking and Unlinking e SuccessDelegate success The function to call when the link completes This delegate will have an 9
10. will have a string result with the full path to the local file e FailureDelegate failure optional This delegate is called if the procedure fails If no delegate is supplied Boxit will output to Unity s error log Default null e WarningDelegate warning optional This delegate is called if the local file exists and overwrite Local is set to false If no warning delegate is specified then Boxit will output the message to Unity s warning log Default null DownloadFile 29 e ProgressDelegate progress optional This delegate is called as the procedure runs giving an update to the progress incrementally between zero 0 and one 1 0f If no progress delegate is specified then nothing will be sent back to the application Default null e bool overwriteLocal optional If true the download will wipe out the local file and replace it with the downloaded file If this is set to false and the file exists a warning will occur Default true e string rev optional The revision of the file to retrieve If no revision is specified then the most recent revision will be downloaded Default null Returns long value representing the Boxit request ID This is useful for debugging purposes in the case where you have many requests running in parallel Usage Boxit BoxitClient client void Awake client DownloadFile Boxit ROOT sandbox test txt Local Folder A test txt Success null Warning Progress
11. 2 oAuthToken structure with the Access token from Dropbox You don t need to store this token anywhere since Boxit it does this for you e FailureDelegate failure optional The function to call if the link fails If this delegate is not provided then Boxit will just output any errors to Unity s log Default null Returns long value representing the Boxit request ID This is useful for debugging purposes in the case where you have many requests running in parallel Usage Boxit BoxitClient client private void SomeFunction client Link Success private void Success long requestID Boxit 9 2 oAuthToken token Debug Log Link Successful Linking Process Linking is actually a complicated process that involves many steps all which happen behind the scenes to make your life easier Dropbox is sent your application key and secret with a request for an authorization token Boxit uses the authorization token sending the user to a web browser to log in and authenticate After authenticating Boxit requests the Access token from Dropbox PP No P All future Boxit requests are signed with the Access token so no further login is required Unlinking 23 As of version 1 Dropbox requires all authentication be done through either a web browser or their own application Boxit handles this by opening a web browser and allowing the user to log in Unity will go into a pause state awaiting the finalization of the login
12. E ES bles gn TES 63 9 8 Sharelank A A A eR do ARO AD dg METRO de AA Te ia oy eae 64 IV Table of Contents 9 9 CopyRef A AT A RR TA A RA A A E 1 Overview Boxit is a plugin for Unity3D that allows you to connect to a Dropbox account This can be used for numerous purposes including e Backing up game data such as stats or level progress e Sharing game data across multiple devices like an iPhone and an iPad so game play can contin ue wherever you are e Backing up application data such as a database or text files e Storing or retrieving photos e Many more 2 Create a Dropbox Account Before you can use Boxit in your application you will need to have an active Dropbox account This can be set up on Dropbox s website at Dropbox com O i you already have a Dropbox account you can skip this chaper Any user that uses your application with Boxit will also need a Dropbox account so you will need to either direct them to the Dropbox website or provide instructions on how to do this 2 1 Create a New Account In a web browser go to Dropbox com Click on the arrow next to the Sign in link in the upper right corner Click on the Create an Account button Figure 2 1 Create Account g Sign in v assword I Remember me Create a New Account 3 Fill in the account details for your new account Be sure to agree to the Dropbox Terms Figure 2 2 Fill in Account Information Create an
13. PI W Create an app At some point you will be asked to agree to the Dropbox developer agreement 6 Create a Dropbox App Figure 3 4 User Agreement 22 Dropbox API Access Before you can access the Dropbox API you must agree to the Dropbox Developer Terms and Conditions Dropbox App Developer Terms and Conditions Last Updated 5 1 2010 These Dropbox App Developer Terms and Conditions Terms constitute a legal agreement between Dropbox Inc Dropbox and you you Please read the Terms our Privacy Policy and all policies mentioned in the Terms which are incorporated herein by reference carefully YOU ACKNOWLEDGE AND AGREE THAT BY CLICKING ON THE I AGREE OR I ACCEPT BUTTON OR BY CREATING AN APP YOU ARE INDICATING THAT YOU HAVE READ UNDERSTAND AND AGREE TO BE BOUND BY THESE TERMS IF YOU DO NOT AGREE TO THESE TERMS THEN YOU HAVE NO RIGHT TO ACCESS OR USE THE DROPBOX DEVELOPER WEBSITE SITE DROPBOX KEYS OR CREATE AN APP If you accept or agree to these Terms on behalf of a company or other legal entity you represent and warrant that you have the authority to bind that company or other legal entity to these Terms and in such event you and your will refer and apply to that company or other legal entity 1 Definitions App means an application developed by you as a Dropbox Developer that functions or is compatible with the Dropbox Services accessed and available only via a Third Party Platform and hoste
14. This is useful for debugging purposes in the case where you have many requests running in parallel Usage Boxit BoxitClient client void Awake client GetShareLink Boxit ROOT dropbox test txt Success public Success long requestID Boxit 9 8 ShareLink shareLink 38 Boxit Functions process the share link here 7 9 GetMedia Description Returns a 9 8 ShareLink directly to a file Similar to 7 8 GetShareLink The difference is that this bypasses the Dropbox webserver used to provide a preview of the file so that you can effectively stream the contents of your media long GetMedia ROOT root string remotePath SuccessDelegate lt 9 8 ShareLink gt success FailureDelegate failure null string locale null Parameters e ROOT root The root relative to which path is specified Valid values are Boxit ROOT sandbox and Boxit ROOT dropbox e string remotePath The path to the file or folder This path is relative to the root specified e SuccessDelegate success Delegate that is called when the procedure completes This delegate will have a 9 8 ShareLink result e FailureDelegate failure optional This delegate is called if the procedure fails If no delegate is supplied Boxit will output to Unity s error log Default null e string locale optional Use to specify language settings for user error messages and other language specific text Click here for a description of the l
15. a 22 62 Unlinkine sro na a tee aS E EE qa EA a a 23 DEMO serrera ena e A E NE A EE 23 Boxit Functions esses ese a A aie Beis o aa ia 25 Ce E A RS e 25 Fed CG eiNetaData gt a suo A A Gate a SD os E a oe eee al e 26 3a aaa Gites eked eet E a DO Aa RE 28 de Upload TA A a RN new tam ania 30 MO CAROS ds das rd sa taa 32 DE Restore tera taa eo att nat bas posta 33 A RR EE A A bs A Nerd RA ees 35 e GetS arelink aa A is a o ca ei 36 70 Mis A a e tia tds 38 LO ENCORE et oo iS 39 411 Download Thumbnail EN AA EA Di 41 T12 GopyFileFromPathe e EGO ps SO e A 42 73 CopyFileFromCopyRef AA ee nn 44 DAs raro E NA SERENE EER ee IE 45 TAG Delete TNA Ee Ee ES I A Oey 47 FAG Moves EGR tee a bota rena be Ah a dao gah he a aN bat Alt it A gt 48 Vel Get Delta seus mae oe iat eee aca aoe es a oe oe AA AI AE oo i a ay ah ee ae ee 49 7 18 DownloadFileIfRemoteNewer iaa 51 7 19 UploadFilelfLocalNewer sn aia AA nn 52 TOO SyndFiles sa As A 54 Advanced Syncing E A A A A A 56 Boxit Data Structures o ooooooo nooo rss 58 Sd Global an A A negra E A D aN 58 ROOT ut os ote un DR el cc les at ld ets eee 58 THUMBNAIL FORMAT a e e o DOS 58 THUMBNAI SIZE ssa da Pon eta Ao Po Share ake 59 o us isca ADE Ai alee a bic 1S A ATE rara ate SERA Code ca 59 O eiee rata II A SS a a ARE 60 GA untado Ma a EO ety O ad e 60 9 5 aMetaDatas di ti a Pa RS oa alata nan o ata Ra o 61 96 Deli rs Di a it as Se ee 62 9 7 DeltaEntry A A AS Bra A O
16. a to get a list of 9 7 DeltaEntry which are instructions on how to update your local state to match the server s state Members string Cursor A string that encodes the latest information that has been returned On the next call to 7 17 GetDelta pass in this value bool Has More If true then there are more entries available you can call 7 17 GetDelta again immediately to retrieve those entries If false then wait for at least five minutes preferably longer before checking again bool Reset If true clear your local state before processing the delta entries Reset is always true on the initial call to 7 17 GetDelta i e when no cursor is passed in Otherwise it is true in rare situ DeltaEntry 63 ations such as after server or account maintenance or if a user deletes their app folder List lt 9 7 DeltaEntry gt Entries A list of 9 7 DeltaEntry Methods string ToString returns a string description of the 9 6 Delta information 9 7 DeltaEntry Description Each delta entry is a 2 item list of one of the following forms lt path gt lt 9 5 MetaData gt Indicates that there is a file folder at the given path You should add the entry to your local path The metadata value is the same as what would be returned by the 7 2 GetMetaData call except folder 9 5 MetaData doesn t have hash or contents fields To correctly process 9 6 Delta entries e If the new entry includes parent folders that don t y
17. all be created at once so you don t need to make repeated call S long CreateFolder ROOT root string remotePath SuccessDelegate lt 9 5 MetaData gt success FailureDelegate failure null string locale null Parameters e ROOT root The root relative to which path is specified Valid values are Boxit ROOT sandbox 46 Boxit Functions and Boxit ROOT dropbox e string remotePath The path of the folder to create on the Dropbox server This path is relative to the root specified e SuccessDelegate success Delegate that is called when the procedure completes This delegate will have a 9 5 MetaData result of the newly created folder e FailureDelegate failure optional This delegate is called if the procedure fails If no delegate is supplied Boxit will output to Unity s error log Default null e string locale optional Use to specify language settings for user error messages and other language specific text Click here for a description of the locale value Default null Returns long value representing the Boxit request ID This is useful for debugging purposes in the case where you have many requests running in parallel Usage Boxit BoxitClient client void Awake client CreateFolder Boxit ROOT sandbox Folder A Folder B Folder C Success y void Success long requestID Boxit 9 5 MetaData metaData handle the metaData here Delete 47 7 15 Delete Description Del
18. ath to the file or folder where the file or folder should be copied on the Dropbox server This path is relative to the root specified SuccessDelegate success Delegate that is called when the procedure completes This delegate will have a 9 5 MetaData result of the file s final location FailureDelegate failure optional This delegate is called if the procedure fails If no delegate is supplied Boxit will output to Unity s error log Default null string locale optional Use to specify language settings for user error messages and other language specific text Click here for a description of the locale value Default null Returns long value representing the Boxit request ID This is useful for debugging purposes in the case where you have many requests running in parallel Usage Boxit BoxitClient client void Awake client CopyFileFromPath Boxit ROOT sandbox Remote Path logo png Remote Path Folder A logo png Success void Success long requestID Boxit 9 5 MetaData metaData handle the metaData here 44 Boxit Functions 7 13 CopyFileFromCopyRef Description Copies a file from a 9 9 CopyRef to another path on the Dropbox server O Using this function can let you save a file into another user s Dropbox long CopyFileFromCopyRef ROOT root string fromCopyRef string toRemotePath SuccessDelegate lt 9 5 MetaData gt success FailureDelegate failure null string locale null
19. ax 1 000 e string locale optional Use to specify language settings for user error messages and other language specific text Click here for a description of the locale value Default null Returns long value representing the Boxit request ID This is useful for debugging purposes in the case where you have many requests running in parallel Restore 33 Usage Boxit BoxitClient client void Awake client GetRevisions Boxit ROOT sandbox image png Success public Success long requestID List lt Boxit 9 5 MetaData gt revisionList process the list of revisions 7 6 Restore Description Restores a file path to a previous revision unlike downloading a file at a given revision and then re uploading it this call happens entirely on the Dropbox server It also saves a lot of bandwidth long Restore ROOT root string remotePath string rev SuccessDelegate lt 9 5 MetaData gt success FailureDelegate failure null string locale null Parameters 34 Boxit Functions e ROOT root The root relative to which path is specified Valid values are Boxit ROOT sandbox and Boxit ROOT dropbox e string remotePath The path to the file on the Dropbox server This path is relative to the root specified e string rev The revision of the file to restore to You can get a list of file revisions by calling 7 5 GetRevisions e SuccessDelegate success Delegate that is called when th
20. cess i void Success long requestID DateTime dateTime handle the dateTime here SyncFile 55 8 Advanced Syncing If your application will be run on multiple devices that share the same Dropbox files then you will need to employ some form of advanced synchronization The basic steps for this are 1 Check to see if the remote file s is more recent than the local file s If it is download the remote file This will ensure that any changes made by other devices will be pulled in locally before making updates Update the file s that you downloaded 3 Upload the file s back to Dropbox for the next device to use Example Code Boxit BoxitClient client void UpdateAndSync 1 Download the remote file if it is more recent client DownloadFilelfRemoteNewer Boxit ROOT sandbox RemoteFolder file txt LocalFolder file txt DownloadSuccess Failure private void DownloadSuccess long requestID string localFilePath 56 57 2 Update the file s contents or do whatever processing is necessary here 3 Upload the file back to the Dropbox server client UploadFile Boxit ROOT sandbox LocalFolder file txt RemoteFolder file txt UploadSuccess Failure private void UploadSuccess long requestID Boxit 9 5 MetaData metaData process the completion of the update and sync private void Failure long requestID string error the update and sync did not succe
21. d by you or by a third party on your sl ae rs m e I agree with the Dropbox Developer terms and conditions Fill in your application s properties Figure 3 5 Create App Properties q Create a new app App name Description Access level App folder Your app only needs access to a single folder within the user s Dropbox recommended Full Dropbox Your app needs access to the user s entire Dropbox Createan App 7 Be sure you set your access level here because it cannot be changed later e App Folder Your app will only be allowed access to its own folder and sub folders You can t modify any files or folders outside of this structure e Full Dropbox Your app will have access to any files or folders in the Dropbox account After you create your app you can see its properties Be sure to record the App Key and App Secret as you will need these when developing with Boxit You can always come back to Dropbox to get these keys later Figure 3 6 App Properties Unique App App name App status Development Apply for production status App key App secret Access type App folder Name of app folder O i you set your access type to App Folder you don t need to create the application s folder Dropbox will do this automatically for you when you upload or attempt to access your fir st remote file 4 Set Up the Unity Environment 4 1 Create Open Project Create a new Uni
22. e dl client GetAccountInfo Success private void Success long requestID Boxit 9 3 AccountInfo accountInfo process accountInfo here Example 2 16 Asynchronous Functions Boxit BoxitClient client void Awake client GetMetaData Boxit ROOT sandbox Folder A Test txt Success y private void Success long requestID Boxit 9 5 MetaData metaData process metaData here FailureDelegate Description This function is called if the procedure fails If you don t supply a FailureDelegate then Boxit will send the error to Unity s log as an error void FailureDelegate long requestID string error Parameters e long requestID The request ID assigned to the procedure The requestID is just the current date time in string format This value helps in debugging where multiple requests might be running in parallel e string error The error description that caused the procedure to fail Returns Nothing is returned by a FailureDelegate Delegates 17 Usage Boxit BoxitClient client void Awake client GetAccountInfo Success Failure void Success long requestID Boxit 9 3 AccountInfo accountInfo dl process accountInfo here void Failure long requestID string error process failure here WarningDelegate Description The warning delegate is called if there are any non critical issues that inhibit the Boxit procedure from completing Not many Boxit function
23. e procedure completes This delegate will have a 9 5 MetaData result for the restored file e FailureDelegate failure optional This delegate is called if the procedure fails If no delegate is supplied Boxit will output to Unity s error log Default null e string locale optional Use to specify language settings for user error messages and other language specific text Click here for a description of the locale value Default null Returns long value representing the Boxit request ID This is useful for debugging purposes in the case where you have many requests running in parallel Usage Boxit BoxitClient client void Awake client Restore Boxit ROOT sandbox image png 63098a9de2 Success public Success long requestID Boxit 9 5 MetaData metaData process the restore file Search 35 7 7 Search Description Returns 9 5 MetaData for all files and folders whose filename contains the given search string as a substring Searches are limited to the folder path and its sub folder hierarchy provided in the call long Search ROOT root string remotePath string query SuccessDelegate lt List lt 9 5 MetaData gt gt success FailureDelegate failure null long fileLimit 1000 bool includeDeleted false string locale null Parameters e ROOT root The root relative to which path is specified Valid values are Boxit ROOT sandbox and Boxit ROOT dropbox e string
24. ed 9 Boxit Data Structures 9 1 Global Variables ROOT Description The root from which to start remotely Valid values e sandbox Starts the path at the application s folder This is the only valid value if your applica tion s access level is set to If your access is set to then you can use sand box as well e dropbox Starts the path at the user s Dropbox root This can only be used if the application s access level is set to THUMBNAIL_FORMAT Description The image format for the downloaded thumbnail Valid values e jpeg Good for photos e png Good for screenshots illustrations logos etc 58 THUMBNAIL SIZE Description The size of the downloaded thumbnail Valid values e small 32 x 32 e medium 64 x 64 e large 127 x 128 e s 64x64 e m 128x 128 e 1 640 x 480 e xl 1024x 768 9 2 oAuthToken Description Stores the token and secret pair for authorization Members string Token The token of the authorization pair string Secret The secret of the authorization pair Methods string ToString returns a string description of the 9 2 oAuth Token Properties bool IsEmpty returns whether the token has any data in it oAuthToken 59 60 Boxit Data Structures 9 3 Accountinfo Description Stores information about a user s account Members string Referral Link The user s referral link string Display Name The user s display name string UID The user s
25. et exist in your local state create those parent folders in your local state e If the new entry is a file replace whatever your local state has at path with the new entry e If the new entry is a folder check what your local state has at lt path gt If it s a file replace it with the new entry If it s a folder apply the new lt 9 5 MetaData gt to the folder but do not modify the folder s children lt path gt null Indicates that there is no file folder at the given path To update your local state to match anything at path and all its children should be deleted Deleting a folder in your Dropbox will sometimes send down a single deleted entry for that folder and sometimes separate entries for the folder and all child paths If your local state doesn t have anything at path ignore this entry Note Dropbox treats file names in a case insensitive but case preserving way To facilitate this the lt path gt values above are lower cased versions of the actual path The lt 9 5 MetaData gt value has the original case preserved path 64 Boxit Data Structures Members string Path Path of the file or folder bool Is Deleted Whether or not the path has been removed from Dropbox 9 5 MetaData MetaData The 9 5 MetaData for the file or folder Will be null for deleted files and folders Methods string ToString returns a string description of the 9 7 DeltaEntry information 9 8 ShareLink Description Stores a Dro
26. etes a file or folder on the Dropbox server long Delete ROOT root string remotePath SuccessDelegate lt 9 5 MetaData gt success FailureDelegate failure null string locale null Parameters e ROOT root The root relative to which path is specified Valid values are Boxit ROOT sandbox and Boxit ROOT dropbox e string remotePath The path of the file or folder to delete on the Dropbox server This path is relative to the root specified e SuccessDelegate success Delegate that is called when the procedure completes This delegate will have a 9 5 MetaData result of the deleted file or folder e FailureDelegate failure optional This delegate is called if the procedure fails If no delegate is supplied Boxit will output to Unity s error log Default null e string locale optional Use to specify language settings for user error messages and other language specific text Click here for a description of the locale value Default null Returns long value representing the Boxit request ID This is useful for debugging purposes in the case where you have many requests running in parallel Usage Boxit BoxitClient client void Awake client Delete Boxit ROOT sandbox Folder A Folder B 48 Boxit Functions Success void Success long requestID Boxit 9 5 MetaData metaData handle the metaData here 7 16 Move Description Moves a file or folder to a new location on the Dropbox server
27. guage settings for user error messages and other language specific text Click here for a description of the locale value Default null Returns long value representing the Boxit request ID This is useful for debugging purposes in the case where you have many requests running in parallel Usage 25 26 Boxit Functions Boxit BoxitClient client void Awake client GetAccountInfo Success private void Success long requestID Boxit 9 3 AccountInfo accountInfo process accountInfo here 7 2 GetMetaData Description Retrieves file and folder metadata long GetMetaData ROOT root string remotePath SuccessDelegate lt 9 5 MetaData gt success FailureDelegate failure null long fileLimit 10000 string hash null bool list true bool includeDeleted false string rev null string locale null Parameters e ROOT root The root relative to which path is specified Valid values are Boxit ROOT sandbox and Boxit ROOT dropbox e string remotePath The path to the file or folder This path is relative to the root specified e SuccessDelegate success Delegate that is called when the procedure completes This delegate will have a 9 5 MetaData structure with the data from Dropbox GetMetaData 27 e FailureDelegate failure optional This delegate is called if the procedure fails If no delegate is supplied Boxit will output to Unity s error log Default null e long fileLim
28. it optional When listing a folder the service will not report listings containing more than the specified amount of files and will instead respond with a 406 Not Acceptable sta tus response Default 10 000 Max 25 000 e string hash optional Each call to 7 2 GetMetaData on a folder will return a hash field gener ated by hashing all of the metadata contained in that response On later calls to 7 2 GetMetaData you should provide that value via this parameter so that if nothing has changed the result will be a null 9 5 MetaData structure instead of the full potentially very large folder listing This para meter is ignored if the specified path is associated with a file or if list false A folder shared between two users will have the same hash for each user Default null e bool list optional If true the folder s 9 5 MetaData will include a contents field with a list of metadata entries for the contents of the folder If false the contents field will be null This para meter is only relevant to folders not files Default true e bool includeDelegate optional If this parameter is set to true then files and folders that have been deleted will also be included in the 7 2 GetMetaData call Default false e string rev optional If you include a particular revision number then only the 9 5 MetaData for that revision will be returned Default null e string locale optional Use to specify language settings for user err
29. l This delegate is called as the procedure runs giving an update to the progress incrementally between zero 0 and one 1 0f If no progress delegate is specified then nothing will be sent back to the application Default null e bool overwriteRemote optional If true the existing file will be overwritten by the new one If false the new file will be automatically renamed for example test txt might be automatically renamed to test 1 txt The new name can be obtained from the returned metadata Default true e string parentRev optional The revision of the file you re editing If parentRev matches the lat est version of the file on the user s Dropbox that file will be replaced Otherwise the new file will be automatically renamed for example test txt might be automatically renamed to test con flicted copy txt If you specify a revision that doesn t exist the file will not save error 400 Get the most recent rev by performing a call to 7 2 GetMetaData Default null e string locale optional Use to specify language settings for user error messages and other language specific text Click here for a description of the locale value Default null Returns long value representing the Boxit request ID This is useful for debugging purposes in the case where you have many requests running in parallel Usage Boxit BoxitClient client void Awake client UploadFile Boxit ROOT sandbox Local Folder A i
30. lder Test File txt Local Test Folder Subfolder A Test File txt Example 13 Success Failure Warning Progress private void Success long requestID string fullFilePath Debug Log Success File downloaded to fullFilePath private void Failure long requestID string error Debug Log Failed to download file Reason error private void Warning long requestID string warning Debug Log Warning occurred when downloading file warning 3 private void Progress long requestID float progress Debug Log Download Progress progress 100 You can see that if we wanted to use the downloaded file we would not put the code for this after the DownloadFile call Instead we d put this code in the Success delegate function In this example the DownloadFile function can take up to four delegates but only the success deleg ate is required If you don t supply the failure delegate Boxit will output to Unity s error log If you don t supply the warning delegate Boxit will output to Unity s warning log If you don t supply a progress delegate then Boxit will not send any progress notifications 14 Asynchronous Functions Q Using a progress delegate can be useful if you want to show a progress bar or some other way to inform your users that a download or upload is occuring 5 2 Benefits Using asynchronous calls lets you continue to update your application animate
31. lient void Awake client Move Boxit ROOT sandbox Folder A Folder B test txt Folder A Folder B test2 txt Success hi void Success long requestID Boxit 9 5 MetaData metaData handle the metaData here 7 17 GetDelta Description A way of letting you keep up with changes to files and folders in a user s Dropbox You can periodically call 7 17 GetDelta to get a list of 9 7 DeltaEntry which are instructions on how to update your local state to match the server s state If you pass a cursor then only the changes that 50 Boxit Functions have occurred since that cursor will be returned otherwise all changes will be returned long GetDelta string cursor SuccessDelegate lt 9 6 Delta gt success FailureDelegate failure null string locale null Parameters e string cursor A string that is used to keep track of your current state On the next call pass in this value to return delta entries that have been recorded since the cursor was returned e SuccessDelegate success Delegate that is called when the procedure completes This delegate will have a 9 6 Delta result that lists all the changes that have occurred since the cursor e FailureDelegate failure optional This delegate is called if the procedure fails If no delegate is supplied Boxit will output to Unity s error log Default null e string locale optional Use to specify language settings for user error messages and other language s
32. mage png image png Success public Success long requestID Boxit 9 5 MetaData metaData process after the file uploads 32 Boxit Functions 7 5 GetRevisions Description Obtains 9 5 MetaData for the previous revisions of a file Q Only revisions up to thirty days old are available or more if the Dropbox user has Pack Rat You can use the revision number in conjunction with the 7 6 Restore call to revert the file to its previous state long GetRevisions ROOT root string remotePath SuccessDelegate lt List lt MetaData gt gt success FailureDelegate failure null long revLimit 10 string locale null Parameters e ROOT root The root relative to which path is specified Valid values are Boxit ROOT sandbox and Boxit ROOT dropbox e string remotePath The path to the file on the Dropbox server This path is relative to the root specified e SuccessDelegate success Delegate that is called when the procedure completes This delegate will have a list of 9 5 MetaData containing all the revisions of a file e FailureDelegate failure optional This delegate is called if the procedure fails If no delegate is supplied Boxit will output to Unity s error log Default null e long revLimit optional When listing a file the service will not report listings containing more than the amount specified and will instead respond with a 406 Not Acceptable status response Default 10 M
33. ocale value Default null GetCopyRef 39 Returns long value representing the Boxit request ID This is useful for debugging purposes in the case where you have many requests running in parallel Usage Boxit BoxitClient client void Awake client GetMedia Boxit ROOT dropbox test txt Success public Success long requestID Boxit 9 8 ShareLink shareLink i process the share link here 7 10 GetCopyRef Description Creates and returns a 9 9 CopyRef to a file This reference string can be used to copy that file to another user s Dropbox by passing it in as the fromCopyRef parameter on 7 13 CopyFile FromCopyRef long GetCopyRef ROOT root string remotePath SuccessDelegate lt 9 9 CopyRef gt success FailureDelegate failure null 40 Boxit Functions Parameters e ROOT root The root relative to which path is specified Valid values are Boxit ROOT sandbox and Boxit ROOT dropbox e string remotePath The path to the file This path is relative to the root specified e SuccessDelegate success Delegate that is called when the procedure completes This delegate will have a 9 9 CopyRef result e FailureDelegate failure optional This delegate is called if the procedure fails If no delegate is supplied Boxit will output to Unity s error log Default null Returns long value representing the Boxit request ID This is useful for debugging purposes in the case where you have many
34. or messages and other language specific text Click here for a description of the locale value Default null Returns long value representing the Boxit request ID This is useful for debugging purposes in the case where you have many requests running in parallel Usage Boxit BoxitClient client void Awake client GetMetaData Boxit ROOT sandbox Folder A Test txt Success 28 Boxit Functions private void Success long requestID Boxit 9 5 MetaData metaData process metaData here If metaData null then no change occurred given the hash code J 7 3 DownloadFile Description Downloads a file to your local application s persistent data path working directory long DownloadFile ROOT root string remotePath string localPath SuccessDelegate lt string gt success FailureDelegate failure null WarningDelegate warning null ProgressDelegate progress null bool overwriteLocal true string rev null Parameters e ROOT root The root relative to which path is specified Valid values are Boxit ROOT sandbox and Boxit ROOT dropbox e string remotePath The path to the file on the Dropbox server This path is relative to the root specified e string localPath The path to the file on the local device This path is relative to the application s persistent data path working directory e SuccessDelegate success Delegate that is called when the procedure completes This delegate
35. ox server stores whatever the desktop client sends up this should only be used for display purposes such as sorting and not for example to determine if a file has changed or not string Path Returns the canonical path to the file or directory bool Is Dir Whether the given entry is a folder or not string Icon The name of the icon used to illustrate the file type in Dropbox s icon library string Root The root or top level folder depending on your access level All paths returned are relat ive to this root level Permitted values are either dropbox or app folder string Mime Type The Mime type of the file or folder 62 Boxit Data Structures string Hash A folder s hash is useful for indicating changes to the folder s contents in later calls to 7 2 GetMetaData This is roughly the folder equivalent to a file s rev bool Is Deleted Whether the given entry is deleted only included if deleted files are being returned List lt 9 5 MetaData gt Contents A list of 9 5 MetaData contents for each of the files in a folder Methods string ToString returns a string description of the 9 5 MetaData information Properties DateTime ModifiedDate DateTime representation of the Modified member DateTime UTCDateModified UTC DateTime representation of the Modified member 9 6 Delta Description A way of letting you keep up with changes to files and folders in a user s Dropbox You can periodically call 7 17 GetDelt
36. pbox link to files or folders users can use to view a preview of the file in a web browser The link can be used publicly and directs to a preview page of the file For compatibil ity reasons it returns the link s expiration date in Dropbox s usual date format All links are currently set to expire far enough in the future so that expiration is effectively not an issue Members string Url Link to the file string Expires Expiration date of the link Methods string ToString returns a string description of the 9 8 ShareLink information Properties DateTime ExpiresDate DateTime representation of the Expires string DateTime UTCDateExpires UTC DateTime representation of the Expires string CopyRef 65 9 9 CopyRef Description Stores a copyRef to a file This reference string can be used to copy that file to another user s Dropbox by passing it in as the fromCopyRef parameter on the 7 13 CopyFileFromCopyRef function Members string Copy Ref Reference to the file for copying string Expires Expiration date of the copy ref Methods string ToString returns a string description of the 9 9 CopyRef information Properties DateTime ExpiresDate DateTime representation of the Expires string DateTime UTCDateExpires UTC DateTime representation of the Expires string
37. pecific text Click here for a description of the locale value Default null Returns long value representing the Boxit request ID This is useful for debugging purposes in the case where you have many requests running in parallel Usage Boxit BoxitClient client void Awake t client GetDelta Success void Success long requestID Boxit 9 6 Delta delta handle the delta here DownloadFilelfRemoteNewer 51 7 18 DownloadFilelfRemoteNewer Description Downloads a file to your local application s persistent data path working directory if the remote version of the file is more recent than the local version void DownloadFileIfRemoteNewer ROOT root string remotePath string localPath SuccessDelegate lt string gt success FailureDelegate failure nul1 The internal link is invalid progress null Parameters e ROOT root The root relative to which path is specified Valid values are Boxit ROOT sandbox and Boxit ROOT dropbox e string remotePath The path to the file on the Dropbox server This path is relative to the root specified e string localPath The path to the file on the local device This path is relative to the application s persistent data path working directory e SuccessDelegate success Delegate that is called when the procedure completes This delegate will have a string result with the full path to the local file e FailureDelegate failure optional This delegate i
38. remotePath The path to the folder to begin searching at on the Dropbox server This path is relative to the root specified e string query The string to search for in the files and folders e SuccessDelegate success Delegate that is called when the procedure completes This delegate will have a list of 9 5 MetaData for the files that qualified for the search e FailureDelegate failure optional This delegate is called if the procedure fails If no delegate is supplied Boxit will output to Unity s error log Default null e long fileLimit optional No more than fileLimit search results will be returned Default 1 00 0 Max 1 000 e bool includeDeleted optional If this parameter is set to true then files and folders that have been deleted will also be included in the search Default false e string locale optional Use to specify language settings for user error messages and other language specific text Click here for a description of the locale value Default null 36 Boxit Functions Returns long value representing the Boxit request ID This is useful for debugging purposes in the case where you have many requests running in parallel Usage Boxit BoxitClient client void Awake client Search Boxit ROOT dropbox Remote Folder A Subfolder FindMe Success hi public Success long requestID List lt Boxit 9 5 MetaData gt metaData process the search results 7 8 GetShareLink
39. requests running in parallel Usage Boxit BoxitClient client void Awake client GetCopyRef Boxit ROOT dropbox test txt Success public Success long requestID Boxit 9 9 CopyRef copyRef process the copy ref here DownloadThumbnail 41 7 11 DownloadThumbnail Description Gets a thumbnail for an image and stores it in a Texture2D that Unity can use long DownloadThumbnail ROOT root string remotePath SuccessDelegate lt Texture2D gt success FailureDelegate failure null ProgressDelegate progress null THUMBNAIL FORMAT format THUMBNAIL FORMAT jpeg THUMBNAIL SIZE size THUMBNAIL SIZE small Parameters e ROOT root The root relative to which path is specified Valid values are Boxit ROOT sandbox and Boxit ROOT dropbox e string remotePath The path to the image file on the Dropbox server This path is relative to the root specified e SuccessDelegate success Delegate that is called when the procedure completes This delegate will have a Texture2D result that can be used directly in Unity e FailureDelegate failure optional This delegate is called if the procedure fails If no delegate is supplied Boxit will output to Unity s error log Default null e ProgressDelegate progress optional This delegate is called as the procedure runs giving an update to the progress incrementally between zero 0 and one 1 0f If no progress delegate is specified then nothing will be
40. s called if the procedure fails If no delegate is supplied Boxit will output to Unity s error log Default null e ProgressDelegate progress optional This delegate is called as the procedure runs giving an update to the progress incrementally between zero 0 and one 1 0f If no progress delegate is specified then nothing will be sent back to the application Default null Returns Nothing This is a multi step procedure that makes several calls asynchronously so no request ID is known at the time of the call Usage 52 Boxit Functions Boxit BoxitClient client void Awake client DownloadFileIfRemoteNewer Boxit ROOT sandbox test txt Local Folder A test txt Success void Success long requestID string localFilePath handle the downloaded file here 7 19 UploadFilelfLocalNewer Description Uploads a file from your applications persistent data path working directory to the Dropbox server only if the local version of the file is more recent than the remote version void UploadFileIfLocalNewer ROOT root string localPath string remotePath SuccessDelegate lt 9 5 MetaData gt success FailureDelegate failure null ProgressDelegate progress null Parameters e ROOT root The root relative to which path is specified Valid values are Boxit ROOT sandbox and Boxit ROOT dropbox e string localPath The path to the file on the local device This path is relative to the applica
41. s have a warning delegate If no warning deleg ate is supplied Boxit will send the message to Unity s log as a warning void WarningDelegate long requestID string warning Parameters e long requestID The request ID assigned to the procedure The requestID is just the current date time in string format This value helps in debugging where multiple requests might be running in parallel 18 Asynchronous Functions e string warning The warning message that describes the reason the Boxit procedure could not complete Returns Nothing is returned by a WamingDelegate Usage Boxit BoxitClient client void Awake client DownloadFile Boxit ROOT sandbox test txt Local Folder A test txt Success null Warning void Success long requestID string localFilePath handle the downloaded file here void Warning long requestID string warning handle the warning here Delegates 19 ProgressDelegate Description The progress delegate is called as a procedure is being performed This can be useful for feedback during long running operations such as 7 3 DownloadFile or 7 4 UploadFile If no progress delegate is supplied then nothing is fed back to your application void ProgressDelegate long requestID float progress Parameters e long requestID The request ID assigned to the procedure The requestID is just the current date time in string format This value helps in debugging
42. sRabbitz 1 2 0 Boxit Dropbox support in your Unity3D application echo17 3Rabbitz book Table of Contents Table of Contents asa ss sas o a A ad da a SS ada AS ii 1 Overview 2555 ee eS Oe a 1 2 Create a Dropbox Account cece cere eee cece cree eee e rece cere eee senao 2 DT rena New AE casted hese ler Ae eee Nile a as Sete ole area elie 2 3 Create a Dropbox App os sce eee eee cece ccc e eens rece rece rer recorre canas sa 00 4 3 1 Create AN App sere reece cee ee ee ee ee ee ee ee ee ee ee ee eee 4 4 Set Up the Unity Environment eee cece eee eee cee cece eee eee ne oo 8 Act Create Open Project A ee Se aes nae ear tee Seer a 8 42 Download Boxit Plugin vie hes eset obi AA ee eb mer oes 8 4 3 Create a Boxit Ghent A a ca A whee O ace can BE eee alana aaa eb 10 5 Asynchronous Functions see e eee cece cece cece cece eee e rene eeeeeeeeees 12 GU Example we er veep dere ea pee eae ANA pee ag ea tee 12 50 Benefits sata LO he RS adn asias Mean pa 14 5 3 Delegates A in Ca Rd a ti Apa ton a 14 SuccessDelegate 1 ee eee eee tecer eee eee eee ee eee ee eee ees 14 FatireD alegato La ld lode ata a Ua 16 WamingDel gate secs stato stich es 17 Progr ssDeleg t s dies 19 6 Linking and Unlinking o ooooooocorocorccrrocrrrcroccoromsoo 21 Gol ns e is ll de okt e 21 Linking Function A AS E A A qndo ARA 21 Linking Process space edu A So ne ne a Aedes Dedos EEEO s
43. sent back to the application Default null e THUMBNAIL FORMAT format optional The image format for the thumbnail Default THUMBNAIL FORMAT jpeg e THUMBNAIL SIZE size optional The size of the thumbnail Default THUMBNAIL S IZE small Returns long value representing the Boxit request ID This is useful for debugging purposes in the case where you have many requests running in parallel Usage 42 Boxit Functions Boxit BoxitClient client void Awake client DownloadThumbnail Boxit ROOT sandbox logo png Success null null Boxit THUMBNAIL FORMAT png Boxit THUMBNAIL SIZE x1 void Success long requestID Texture2D thumbnail handle the thumbnail here 7 12 CopyFileFromPath Description Copies a file or foler from a path to another path on the Dropbox server O Using this function will save you from having to download then re upload to another pat h This is faster and saves a lot of bandwidth long CopyFileFromPath ROOT root string fromRemotePath string toRemotePath SuccessDelegate lt 9 5 MetaData gt success FailureDelegate failure null string locale null CopyFileFromPath 43 Parameters ROOT root The root relative to which path is specified Valid values are Boxit ROOT sandbox and Boxit ROOT dropbox string fromRemotePath The path to the file or folder on the Dropbox server to copy This path is relative to the root specified string toRemotePath The p
44. tion s UploadFilelfLocalNewer 53 persistent data path working directory e string remotePath The path to the file on the Dropbox server This path is relative to the root specified e SuccessDelegate success Delegate that is called when the procedure completes This delegate will have a 9 5 MetaData result of the uploaded file e FailureDelegate failure optional This delegate is called if the procedure fails If no delegate is supplied Boxit will output to Unity s error log Default null e ProgressDelegate progress optional This delegate is called as the procedure runs giving an update to the progress incrementally between zero 0 and one 1 0f If no progress delegate is specified then nothing will be sent back to the application Default null Returns Nothing This is a multi step procedure that makes several calls asynchronously so no request ID is known at the time of the call Usage Boxit BoxitClient client void Awake client UploadFileIfLocalNewer Boxit ROOT sandbox Local Folder A test txt test txt Success void Success long requestID Boxit 9 5 MetaData metaData handle the metaData here 54 Boxit Functions 7 20 SyncFile Description Makes sure that the most recent version of a file is in the local and remote locations If the local file is newer then Boxit will upload the file If the remote file is newer then Boxit will download the file void SyncFile
45. ty project or open an existing one to import the Boxit plugin 4 2 Download Boxit Plugin To obtain Boxit you must download it from the Unity Asset store To open the store go to the Unity menu Figure 4 1 Asset Store Profiler Occlusion Gulling Navigation In the Unity Asset Store search for Boxit Figure 4 2 Search Boxit Categories gt 3D Models Download Boxit Plugin 9 If you have not purchased Boxit you will see a Buy button If you have already purchased and there is an update available you will see an Update button otherwise you will just see an Import button Figure 4 3 Buy GIO 20N Y ou should now see the Boxit files in your Project window 10 Set Up the Unity Environment Figure 4 4 Boxit Files 4 3 Create a Boxit Client To create a Boxit client create a new GameObject in your Hierarchy window Figure 4 5 Create Client Drag the BoxitClient file from the Boxit Runtime dll in the Plugins directory to the Boxit Client gameobject s inspector Window Figure 4 6 Add Client Component Qu Client ag Untagged Layer Create a Boxit Client 11 Fill in the Application Key and Application Secret with the App Key and App Secret that your app uses from Dropbox Figure 4 7 Insert Keys 7 Boxit Client Script Ly Script BoxitClient o Application Key eoonanana Application Secret sesesenna Log Level Errors_And_Warnini Set your Log Level to whatever level
46. unique Dropbox ID string Country The user s two letter county code if available string Email The user s email address 9 4 Quotalnfo Quota Info The user s quota information Methods string ToString returns a string description of the 9 3 AccountInfo 9 4 Quotalnfo Description The user s quota information for their account Members long Shared The user s used quota in shared folders bytes long Quota The user s total quota allocation bytes long Normal The user s used quota outside of shared folders bytes MetaData 61 Methods string ToString returns a string description of the 9 4 Quotalnfo 95 MetaData Description Stores file and folder infomation Members string Size A human readable description of the file size translated by locale string Rev A unique identifier for the current revision of a file This field is the same rev as else where in the API and can be used to detect changes and avoid conflicts bool Thumb_Exists True if the file is an image that can be converted to a thumbnail via the Down loadThumbnail call long Bytes The file size in bytes string Modified The last time the file was modified on Dropbox in the standard date format not included for the root folder string Client Mtime For files this is the modification time set by the desktop client when the file was added to Dropbox in the standard date format Since this time is not verified the Dropb
47. you want Figure 4 8 Set Log Level Application Secret XXXXXXXXXX Log Level Errors_And_Warnini v Errors_And_Warnings All e Errors And Warnings This will display output to Unity s log whenever there is an error or a warning from Boxit e All This will display errors warnings and debugging information to Unity s log This can be useful if you want to see exactly what information is being passed to and from Dropbox D Asynchronous Functions Boxit uses asynchronous functions to communicate with Dropbox What this means is that requests are sent off to the Dropbox server and Unity will continue to process It is important to realize that Boxit will not have information immediately after calling a request to Dropbox You should not code your calls to handle data after you communicate with Dropbox Instead you will handle results errors warnings and progress in separate delegate functions These functions are called at the appropriate times upon completion of the request upon failure of the request when a warning occurs or while the request progresses respectively 5 1 Example Here is an example of Boxit requesting a file be downloaded from Dropbox Note that we don t hand le the file being downloaded immediately after calling DownloadFile but instead handle the processing of the file in the success delegate Boxit BoxitClient client void Awake client DownloadFile Boxit ROOT Dropbox Test Fo
Download Pdf Manuals
Related Search
Related Contents
EMMA Mobile1 Application Note Camera Interface Arcam Alpha 10 User's Manual Edsal PT3060 Instructions / Assembly Lirio by Philips Ceiling light 36716/11/LI Samsung FW87SST manual de utilizador SES E 1503-2 防犯用直流電源装置規格 保存用 取扱説明書 Copyright © All rights reserved.
Failed to retrieve file