-
Notifications
You must be signed in to change notification settings - Fork 26
New updated Unity SDK documentation #580
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
New updated Unity SDK documentation #580
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
@PythonHackerr is attempting to deploy a commit to the Radar Team on Vercel. A member of the Team first needs to authorize it. |
docs/sdk/unity.mdx
Outdated
|
||
# Unity wrapper SDK | ||
|
||
This is the documentation for the Unity wrapper/plugin, which provides a thin proxy layer for integrating existing native SDKs offering location tracking and geofencing services. Before integrating, review the native SDK documentation for iOS and Android to understand platform-specific requirements and features. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
|
||
Scripts documentation and Demo scene overview can be found in project READMEs. | ||
|
||
## Install |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is there a reason why we are not able to simply provide a .unitypackage
file so that developers can simply add the required assets by double clicking the .unitypackage
from inside unity?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We can and we should, I will create it and publish to the repo
docs/sdk/unity.mdx
Outdated
|
||
To integrate the Unity SDK, download or clone the package and include it in your Unity project: | ||
|
||
1. Copy the `Plugins` folder (containing both Android and iOS native implementations) into the `Assets` directory of your Unity project. Ensure it contains all the required files. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: Ensure it contains all the required files.
feels extraneous
docs/sdk/unity.mdx
Outdated
To integrate the Unity SDK, download or clone the package and include it in your Unity project: | ||
|
||
1. Copy the `Plugins` folder (containing both Android and iOS native implementations) into the `Assets` directory of your Unity project. Ensure it contains all the required files. | ||
2. Import the ExternalDependencyManager for Unity (EDM4U). It is included in the project but you can get it from `Package Manager` or from [repo](https://github.com/googlesamples/unity-jar-resolver): It is required if you want to add and use iOS/Android dependencies directly in your project like: `Android specific libraries (e.g AARs)` or `iOS CocoaPods` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should we say ExternalDependencyManager
instead of ExternalDependencyManager?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We should!
docs/sdk/unity.mdx
Outdated
|
||
1. Copy the `Plugins` folder (containing both Android and iOS native implementations) into the `Assets` directory of your Unity project. Ensure it contains all the required files. | ||
2. Import the ExternalDependencyManager for Unity (EDM4U). It is included in the project but you can get it from `Package Manager` or from [repo](https://github.com/googlesamples/unity-jar-resolver): It is required if you want to add and use iOS/Android dependencies directly in your project like: `Android specific libraries (e.g AARs)` or `iOS CocoaPods` | ||
3. Ensure that any required permissions or settings specific to location tracking and geofencing are configured on both iOS and Android, as outlined in the native SDK documentation. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Lets link to the corresponding sections within native SDK documentation here.
docs/sdk/unity.mdx
Outdated
|
||
### Calls to APIs | ||
|
||
The Unity SDK exposes following APIs calls: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't believe having a comma separated list is the best way to index our api calls, maybe a codebox with pseudo code in a class format looks better? Like the C# version of
RadarSDK {
initialize
...
}
And also since we already describe the calls below, do we even need to list them out here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Agree, no need to list them out
|
||
#### GetVerifiedLocationToken | ||
|
||
Once the native SDK retrieves the location, it sends the data back to Unity. On Android, this is done via RadarJavaProxy, and on iOS, it’s done via a delegate or callback defined in RadarUnityBridge.m |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we should either have a descriptions for all api calls or for none of them for consistency.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I will add some short descriptions that make sense to all functions
docs/sdk/unity.mdx
Outdated
```csharp | ||
try | ||
{ | ||
Radar.SomeFunctionality(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
let's use a real call here
package.json
Outdated
@@ -49,6 +49,7 @@ | |||
"@types/react": "^17.0.11", | |||
"@types/react-helmet": "^6.1.1", | |||
"@types/react-router-dom": "^5.1.7", | |||
"cross-env": "^7.0.3", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why are we using cross env? is this just a local dev dependency you need?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we do not need this. Perhaps I added this when I tried to fix some issues. I will delete it and test everything.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Without it, I cannot preview. I get this error:
$ npm run start
> [email protected] start
> NODE_OPTIONS=--openssl-legacy-provider docusaurus start
'NODE_OPTIONS' is not recognized as an internal or external command,
operable program or batch file.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I see, are you working on a windows PC?
Description
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why do we need this? is this also related to the cross-env?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What exactly?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm curious on why do we need to add this new file into the repository, this wasn't previously here.
The preview is not building, I suspect that there may be an issue with the new files you created. I am guessing that you need these files to build the file for you but they are breaking the actual deployment build process. Can you remove those file diffs from this PR, you can obviously keep those on your local copy of the repo but I think we don't want to merge them in. |
Unity SDK documentation