question

brendan avatar image
brendan asked

How to upload files to PlayFab's Content Service

zacb
started a topic on Tue, 16 June 2015 at 2:16 PM

Scenario: I have a file (UB_Icon.png) located in my /Assets/StreamingAssets project folder that I need to upload to the PlayFab content service.

Problem: The out of the box WWW Unity3d class does not afford PUT capability that is compatible with AWS.

10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

brendan avatar image
brendan answered

Sorry, I'm not following the question. We do provide info above on uploading asset packages to the Content service, for use with Unity titles. It's not required that you use what we've provided, but however you upload it, you'll need to make sure you process it correctly on download for use with Unity. The S3 buckets provided by CloudFront don't have restrictions on the data types, so it can really be whatever format you prefer.

10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

jrDev avatar image
jrDev answered

Hey,

What I am confused with is how does Amazon Cloudfront connect with Playfab? What in the script that is posted should I be using to have Playfab, Cloufront and Unity working together?

Sorry for being a little obtuse, I am just new to this whole networking stuff. 

Thanks,

jrDev

10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

jrDev avatar image
jrDev answered

Hey again,

I did find this page https://github.com/PlayFab/PlayFabAssetBundleManager to help with the file uploading but when I got to build my AssetBundle from Assets/AssetBundles/Build AssetBundles, I get this error:

Assets/_Example/LoadAssetBundles.cs(66,28): error CS0117: `AssetBundles.AssetBundleManager' does not contain a definition for `SimulateAssetBundleInEditor'

This makes no sense though because it does contain the definition. Any help is appreciated.

EDIT: This was solved after I reimported the SDK stuff properly. 

Thanks,

jrDev

10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

brendan avatar image
brendan answered
10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

brendan avatar image
brendan answered

Glad to hear you're not blocked on this - please do let us know if you run into any other issues.

10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

jrDev avatar image
jrDev answered

Hey, 

Yes, I did find a solution for my content uploads with the API. The other question I had was do I need to connect my Amazon Cloudfront with Playfab or is this automatic? And how to I see the files uploaded besides using GetContentList? Like is there a visual representation of my files?

 

Thanks,

jrDev

10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

brendan avatar image
brendan answered

No, this operates in the PlayFab CloudFront account, so you don't need to connect your own. We'll be adding more tools to allow for easier management of content in the future, but I'm afraid we can't provide access to the AWS GUI tools for this on the account, as that would be a security issue.

10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

jrDev avatar image
jrDev answered

Ok,

I am guessing there is no time estimate on the Content viewer coming yet?

Also, could you help me with this? https://github.com/PlayFab/PlayFabAssetBundleManager

I turn on Simulation Mode and I am in the scene to test out loading my content and it doesn't seem to load. It attempts to load but at the end I get this log:

"ShootSound was not loaded successfully in 0.520947 seconds"

Is there anything I am missing?

 

Thanks,

jrDev

10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

jrDev avatar image
jrDev answered

Hey again,

 

There is a part in the code that says:

//Make sure you turn this off, or it will go into simulation mode and not use playfab CDN
        AssetBundleManager.SimulateAssetBundleInEditor = false;

I first commented this out to run in Simulation, which is how I got the result above.

When I uncomment it and run it normally though, it turns of Simulation mode of course but throw this error:

Failed downloading bundle ios from https://cdn.playfab.com**************************************

What else can I do since nothing seems to work properly out of the box?

Thanks,

jrDev

10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Error rendering WebPanel (widgets/consolidation-widget.ftl): org.hibernate.hql.internal.ast.QuerySyntaxException: AvailableConsolidation is not mapped [from AvailableConsolidation up where up.node = :node]