File tree Expand file tree Collapse file tree 1 file changed +14
-0
lines changed
Expand file tree Collapse file tree 1 file changed +14
-0
lines changed Original file line number Diff line number Diff line change 1313// limitations under the License.
1414
1515#if UNITY_EDITOR
16+ using System ;
17+ using System . Collections . Generic ;
1618using System . IO ;
19+ using System . Linq ;
20+ using System . Text . RegularExpressions ;
1721using UnityEngine ;
1822using UnityEditor ;
1923using UnityEditor . Build ;
@@ -43,6 +47,16 @@ public void OnPostprocessBuild(BuildReport report)
4347 if ( EditorUserBuildSettings . activeBuildTarget == BuildTarget . StandaloneLinux64 ) {
4448 FileUtil . CopyFileOrDirectory (
4549 r2csMeta , outputDir + "/" + execFilename + "_Data/Plugins/" + r2csMetadataName ) ;
50+
51+ // Copy versioned libraries (Unity skips them)
52+ Regex soWithVersionReg = new Regex ( @".*\.so(\.[0-9])+$" ) ;
53+ var versionedLibs = new List < String > ( Directory . GetFiles ( ROS2ForUnity . GetPluginPath ( ) ) )
54+ . Where ( path => soWithVersionReg . IsMatch ( path ) )
55+ . ToList ( ) ;
56+ foreach ( var libPath in versionedLibs ) {
57+ FileUtil . CopyFileOrDirectory (
58+ libPath , outputDir + "/" + execFilename + "_Data/Plugins/" + Path . GetFileName ( libPath ) ) ;
59+ }
4660 } else {
4761 FileUtil . CopyFileOrDirectory (
4862 r2csMeta , outputDir + "/" + execFilename + "_Data/Plugins/x86_64/" + r2csMetadataName ) ;
You can’t perform that action at this time.
0 commit comments