Skip to content

Commit

Permalink
HAS_UDON_ENCODING
Browse files Browse the repository at this point in the history
  • Loading branch information
Narazaka committed Apr 3, 2024
1 parent 7bc72b4 commit cf43656
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 3 deletions.
2 changes: 2 additions & 0 deletions UdonEncoding/FNV1a32String.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,11 @@ namespace Narazaka.SimpleHash
{
public static class FNV1a32String
{
#if HAS_UDON_ENCODING
public static uint ComputeHash(string str)
{
return FNV1a32.ComputeHash(Koyashiro.UdonEncoding.UdonUTF8.GetBytes(str));
}
#endif
}
}
13 changes: 10 additions & 3 deletions UdonEncoding/Narazaka.SimpleHash.UdonEncoding.asmdef
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
{
"name": "Narazaka.SimpleHash.UdonEncoding",
"rootNamespace": "",
"references": [
"Koyashiro.UdonEncoding",
"Narazaka.SimpleHash"
Expand All @@ -11,7 +10,15 @@
"overrideReferences": false,
"precompiledReferences": [],
"autoReferenced": true,
"defineConstraints": [],
"versionDefines": [],
"defineConstraints": [
"HAS_UDON_ENCODING"
],
"versionDefines": [
{
"name": "net.koyashiro.udonencoding",
"expression": "0",
"define": "HAS_UDON_ENCODING"
}
],
"noEngineReferences": false
}

0 comments on commit cf43656

Please sign in to comment.