It would be nice if we can move the folder where we want. For my own asset store products I use one of the DLLs to find the "package path". I guess for scripts (not in a DLL) could make calls into the DLL to find the package path or use some Directory parsing to find where the script is located.
The last bit with "assembly/editor" is to get rid of the sub folder the DLL is in so I get the actual "root" of my package.
public static string PackagesFullPath
{
get
{
if (_packagePath != null)
{
if (Directory.Exists(_packagePath))
{ // make sure it was not renamed since last detected
return _packagePath;
}
}
_packagePath = Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location);
_packagePath = _packagePath.Replace("\\", "/");
_packagePath = _packagePath.Replace("assembly/editor", "");
return _packagePath;
}
}
L
Lisa Chew
said
almost 6 years ago
Would love to see this, also. I did end up changing all the hardcoded bits like Jeff did, but as soon as I got it working it said my SDK was out of date and after updating I had to make all the changes again. Super annoying. To be fair, I've had to make similar changes to a few of the other 3rd party assets we're using, so it's not like you guys were the only ones to not handle this. However, the others that I've had to change at least consolidated the root path into a single variable at the top of a file somewhere instead of defining it repeatedly and making me find all those different places.
J
Jason McIntosh
said
almost 7 years ago
That's something I'd like to see, as well.
Customer Support
said
almost 7 years ago
We'll keep you in mind for future updates.
Thanks for your patience Jeff.
J
Jeff Amiel
said
almost 7 years ago
Answer
Yeah..the world is not ending - we ended up 'hardcoding' the hardcoded bits in 3 or 4 places in just a couple of files...
Dunno how you would implement a more 'directory aware' solution that was dynamically changeable - but...
Thanks!!
Customer Support
said
almost 7 years ago
Hi Jeff,
Sorry to hear that's not ideal for you.
Actually I don't recall anyone objecting to this in recent memory.
I'll take your feedback to the team for consideration.
Jeff Amiel
it appears that there are several key code dependencies that expect the GameSparks folder to be in the root of the "Assets" folder.
:(
I'm sure my team is not the only one that often move third party assets down into subfolders....
Any thoughts?
Yeah..the world is not ending - we ended up 'hardcoding' the hardcoded bits in 3 or 4 places in just a couple of files...
Dunno how you would implement a more 'directory aware' solution that was dynamically changeable - but...
Thanks!!
- Oldest First
- Popular
- Newest First
Sorted by Newest FirstLeslie Young
The last bit with "assembly/editor" is to get rid of the sub folder the DLL is in so I get the actual "root" of my package.
Lisa Chew
Would love to see this, also. I did end up changing all the hardcoded bits like Jeff did, but as soon as I got it working it said my SDK was out of date and after updating I had to make all the changes again. Super annoying. To be fair, I've had to make similar changes to a few of the other 3rd party assets we're using, so it's not like you guys were the only ones to not handle this. However, the others that I've had to change at least consolidated the root path into a single variable at the top of a file somewhere instead of defining it repeatedly and making me find all those different places.
Jason McIntosh
That's something I'd like to see, as well.
Customer Support
We'll keep you in mind for future updates.
Thanks for your patience Jeff.
Jeff Amiel
Yeah..the world is not ending - we ended up 'hardcoding' the hardcoded bits in 3 or 4 places in just a couple of files...
Dunno how you would implement a more 'directory aware' solution that was dynamically changeable - but...
Thanks!!
Customer Support
Hi Jeff,
Sorry to hear that's not ideal for you.
Actually I don't recall anyone objecting to this in recent memory.
I'll take your feedback to the team for consideration.
Thanks,
Oisin
-
Documentation Notes
-
Design issues with user events
-
Using NoSQL
-
Runtime Collections vs Metadata Collections
-
Anonymous authentication from browser app
-
Modules
-
Movement With Unity
-
Problem with url parameters for downloadables
-
Querying NoSql GameSparks database
-
Challenge accesType
See all 2487 topics