Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion .github/workflows/pull_request_checks_main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -54,8 +54,9 @@ jobs:
needs: [ pre_job ]
duplicate_samples:
name: Duplicate Samples 🪞
if: ${{ github.event.action == 'ready_for_review' || github.event.label.name == 'ready-to-merge'}}
if: ${{ (github.event.action == 'ready_for_review' || (!github.event.pull_request.draft && contains( github.event.pull_request.labels.*.name, 'ready-to-merge'))) && needs.check_commit.outputs.commit_message != 'Sync Dependencies - Auto Commit'}}
uses: ChainSafe/web3.unity/.github/workflows/duplicate_samples.yaml@main
needs: [ check_commit ]
secrets: inherit
sync_dependencies:
name: Sync Dependencies 🔄
Expand Down
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
35 changes: 31 additions & 4 deletions Setup/SyncDependencies.cs
Original file line number Diff line number Diff line change
Expand Up @@ -58,13 +58,23 @@ public void Run()

foreach (string name in namespaces)
{
File.Copy(Path.Combine(source, $"{name}.dll"), Path.Combine(destination, $"{name}.dll"), true);
string fileSource = Path.Combine(source, $"{name}.dll");

string fileDestination = Path.Combine(destination, $"{name}.dll");

File.Copy(fileSource, fileDestination, true);

AddMetaFile(fileDestination);
#if DEBUG
string filePath = Path.Combine(source, $"{name}.pdb");
fileSource = fileSource.Replace(".dll", ".pdb");

if (File.Exists(filePath))
if (File.Exists(fileSource))
{
File.Copy(filePath, Path.Combine(destination, $"{name}.pdb"), true);
fileDestination = fileDestination.Replace(".dll", ".pdb");

File.Copy(fileSource, fileDestination, true);

AddMetaFile(fileDestination);
}
#endif
Console.WriteLine(name);
Expand All @@ -77,4 +87,21 @@ public void Run()

Console.WriteLine("Dependencies Synced Successfully!");
}

private void AddMetaFile(string destination)
{
destination += ".meta";

if (File.Exists(destination)) return;

string text = File.ReadAllText("meta_file_template.txt");

string guid = Guid.NewGuid().ToString();

guid = guid.Replace("-", string.Empty);

text = text.Replace("[[assetGuid]]", guid.Substring(0, 32));

File.WriteAllText(destination, text);
}
}
33 changes: 33 additions & 0 deletions Setup/meta_file_template.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
fileFormatVersion: 2
guid: [[assetGuid]]
PluginImporter:
externalObjects: {}
serializedVersion: 2
iconMap: {}
executionOrder: {}
defineConstraints: []
isPreloaded: 0
isOverridable: 1
isExplicitlyReferenced: 0
validateReferences: 1
platformData:
- first:
Any:
second:
enabled: 1
settings: {}
- first:
Editor: Editor
second:
enabled: 0
settings:
DefaultValueInitialized: true
- first:
Windows Store Apps: WindowsStoreApps
second:
enabled: 0
settings:
CPU: AnyCPU
userData:
assetBundleName:
assetBundleVariant:
12 changes: 6 additions & 6 deletions src/UnitySampleProject/Packages/packages-lock.json
Original file line number Diff line number Diff line change
Expand Up @@ -182,15 +182,15 @@
"source": "local",
"dependencies": {
"com.unity.nuget.newtonsoft-json": "3.0.2",
"io.chainsafe.web3-unity": "3.0.5"
"io.chainsafe.web3-unity": "3.0.6"
}
},
"io.chainsafe.web3-unity.lootboxes": {
"version": "file:../../../Packages/io.chainsafe.web3-unity.lootboxes",
"depth": 0,
"source": "local",
"dependencies": {
"io.chainsafe.web3-unity": "3.0.5"
"io.chainsafe.web3-unity": "3.0.6"
}
},
"io.chainsafe.web3-unity.marketplace": {
Expand All @@ -199,15 +199,15 @@
"source": "local",
"dependencies": {
"com.unity.nuget.newtonsoft-json": "3.0.2",
"io.chainsafe.web3-unity": "3.0.5"
"io.chainsafe.web3-unity": "3.0.6"
}
},
"io.chainsafe.web3-unity.mud": {
"version": "file:../../../Packages/io.chainsafe.web3-unity.mud",
"depth": 0,
"source": "local",
"dependencies": {
"io.chainsafe.web3-unity": "3.0.5"
"io.chainsafe.web3-unity": "3.0.6"
}
},
"io.chainsafe.web3-unity.ramp": {
Expand All @@ -216,7 +216,7 @@
"source": "local",
"dependencies": {
"com.unity.nuget.newtonsoft-json": "3.0.2",
"io.chainsafe.web3-unity": "3.0.5"
"io.chainsafe.web3-unity": "3.0.6"
}
},
"io.chainsafe.web3-unity.web3auth": {
Expand All @@ -225,7 +225,7 @@
"source": "local",
"dependencies": {
"com.unity.nuget.newtonsoft-json": "3.0.2",
"io.chainsafe.web3-unity": "3.0.5"
"io.chainsafe.web3-unity": "3.0.6"
}
},
"nuget.mono-cecil": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,6 @@ EditorBuildSettings:
serializedVersion: 2
m_Scenes:
- enabled: 1
path: Assets/Samples/web3.unity SDK/3.0.5/Web3.Unity Samples/Scenes/SampleMain.unity
path: Assets/Samples/web3.unity SDK/3.0.6/Web3.Unity Samples/Scenes/SampleMain.unity
guid: 516f54f8261cf44459691b7adc25e055
m_configObjects: {}
Loading