| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
1 parent 555f53c commit 087254d
104 files changed
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -19,9 +19,9 @@ public static string[] FindAssets(string filter) | |||
| 19 | 19 | ||
| 20 | 20 | public static string[] FindAssets(string filter, string[] searchInFolders) | |
| 21 | 21 | { | |
| 22 | - SearchFilter searchFilter = new SearchFilter(); | ||
| 22 | + var searchFilter = new SearchFilter { searchArea = SearchFilter.SearchArea.AllAssets }; | ||
| 23 | 23 | SearchUtility.ParseSearchString(filter, searchFilter); | |
| 24 | - if (searchInFolders != null) | ||
| 24 | + if (searchInFolders != null && searchInFolders.Length > 0) | ||
| 25 | 25 | { | |
| 26 | 26 | searchFilter.folders = searchInFolders; | |
| 27 | 27 | searchFilter.searchArea = SearchFilter.SearchArea.SelectedFolders; | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -263,7 +263,7 @@ private static void RunAssemblyStripper(IEnumerable assemblies, string managedAs | |||
| 263 | 263 | string error; | |
| 264 | 264 | var buildTargetGroup = BuildPipeline.GetBuildTargetGroup(platformProvider.target); | |
| 265 | 265 | bool isMono = PlayerSettings.GetScriptingBackend(buildTargetGroup) == ScriptingImplementation.Mono2x; | |
| 266 | - bool stripEngineCode = rcr != null && PlayerSettings.stripEngineCode && platformProvider.supportsEngineStripping; | ||
| 266 | + bool stripEngineCode = rcr != null && PlayerSettings.stripEngineCode && platformProvider.supportsEngineStripping && !EditorUserBuildSettings.buildScriptsOnly; | ||
| 267 | 267 | IEnumerable<string> blacklists = Il2CppBlacklistPaths; | |
| 268 | 268 | if (rcr != null) | |
| 269 | 269 | { | |
@@ -414,11 +414,11 @@ private static string GetMethodPreserveBlacklistContents(RuntimeClassRegistry rc | |||
| 414 | 414 | return sb.ToString(); | |
| 415 | 415 | } | |
| 416 | 416 | ||
| 417 | - static public void InvokeFromBuildPlayer(BuildTarget buildTarget, RuntimeClassRegistry usedClasses, ManagedStrippingLevel managedStrippingLevel) | ||
| 417 | + static public void InvokeFromBuildPlayer(BuildTarget buildTarget, RuntimeClassRegistry usedClasses, ManagedStrippingLevel managedStrippingLevel, BuildReport report) | ||
| 418 | 418 | { | |
| 419 | 419 | var stagingAreaData = Paths.Combine("Temp", "StagingArea", "Data"); | |
| 420 | 420 | ||
| 421 | - var platformProvider = new BaseIl2CppPlatformProvider(buildTarget, Path.Combine(stagingAreaData, "Libraries")); | ||
| 421 | + var platformProvider = new BaseIl2CppPlatformProvider(buildTarget, Path.Combine(stagingAreaData, "Libraries"), report); | ||
| 422 | 422 | ||
| 423 | 423 | var managedAssemblyFolderPath = Path.GetFullPath(Path.Combine(stagingAreaData, "Managed")); | |
| 424 | 424 | AssemblyStripper.StripAssemblies(managedAssemblyFolderPath, platformProvider, usedClasses, managedStrippingLevel); | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -254,7 +254,7 @@ public static void WriteModuleAndClassRegistrationFile(string strippedAssemblyDi | |||
| 254 | 254 | HashSet<UnityType> nativeClasses; | |
| 255 | 255 | HashSet<string> nativeModules; | |
| 256 | 256 | // by default, we only care about il2cpp | |
| 257 | - bool doStripping = PlayerSettings.stripEngineCode; | ||
| 257 | + bool doStripping = PlayerSettings.stripEngineCode && !EditorUserBuildSettings.buildScriptsOnly; | ||
| 258 | 258 | GenerateDependencies(strippedAssemblyDir, icallsListFile, rcr, doStripping, out nativeClasses, out nativeModules, platformProvider); | |
| 259 | 259 | ||
| 260 | 260 | var outputClassRegistration = Path.Combine(outputDir, "UnityClassRegistration.cpp"); | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -111,9 +111,9 @@ internal static bool UseIl2CppCodegenWithMonoBackend(BuildTargetGroup targetGrou | |||
| 111 | 111 | PlayerSettings.GetScriptingBackend(targetGroup) == ScriptingImplementation.IL2CPP; | |
| 112 | 112 | } | |
| 113 | 113 | ||
| 114 | - internal static bool EnableIL2CPPDebugger(BuildTargetGroup targetGroup) | ||
| 114 | + internal static bool EnableIL2CPPDebugger(IIl2CppPlatformProvider provider, BuildTargetGroup targetGroup) | ||
| 115 | 115 | { | |
| 116 | - if (!EditorUserBuildSettings.allowDebugging || !EditorUserBuildSettings.development) | ||
| 116 | + if (!provider.allowDebugging || !provider.development) | ||
| 117 | 117 | return false; | |
| 118 | 118 | ||
| 119 | 119 | switch (PlayerSettings.GetApiCompatibilityLevel(targetGroup)) | |
@@ -276,7 +276,7 @@ private void ConvertPlayerDlltoCpp(string inputDirectory, string outputDirectory | |||
| 276 | 276 | ||
| 277 | 277 | arguments.Add(string.Format("--dotnetprofile=\"{0}\"", IL2CPPUtils.ApiCompatibilityLevelToDotNetProfileArgument(PlayerSettings.GetApiCompatibilityLevel(buildTargetGroup)))); | |
| 278 | 278 | ||
| 279 | - if (IL2CPPUtils.EnableIL2CPPDebugger(buildTargetGroup) && platformSupportsManagedDebugging) | ||
| 279 | + if (IL2CPPUtils.EnableIL2CPPDebugger(m_PlatformProvider, buildTargetGroup) && platformSupportsManagedDebugging) | ||
| 280 | 280 | arguments.Add("--enable-debugger"); | |
| 281 | 281 | ||
| 282 | 282 | var il2CppNativeCodeBuilder = m_PlatformProvider.CreateIl2CppNativeCodeBuilder(); | |
@@ -422,6 +422,8 @@ internal interface IIl2CppPlatformProvider | |||
| 422 | 422 | bool supportsEngineStripping { get; } | |
| 423 | 423 | bool supportsManagedDebugging { get; } | |
| 424 | 424 | bool supportsUsingIl2cppCore { get; } | |
| 425 | + bool development { get; } | ||
| 426 | + bool allowDebugging { get; } | ||
| 425 | 427 | ||
| 426 | 428 | BuildReport buildReport { get; } | |
| 427 | 429 | string[] includePaths { get; } | |
@@ -434,10 +436,11 @@ internal interface IIl2CppPlatformProvider | |||
| 434 | 436 | ||
| 435 | 437 | internal class BaseIl2CppPlatformProvider : IIl2CppPlatformProvider | |
| 436 | 438 | { | |
| 437 | - public BaseIl2CppPlatformProvider(BuildTarget target, string libraryFolder) | ||
| 439 | + public BaseIl2CppPlatformProvider(BuildTarget target, string libraryFolder, BuildReport buildReport) | ||
| 438 | 440 | { | |
| 439 | 441 | this.target = target; | |
| 440 | 442 | this.libraryFolder = libraryFolder; | |
| 443 | + this.buildReport = buildReport; | ||
| 441 | 444 | } | |
| 442 | 445 | ||
| 443 | 446 | public virtual BuildTarget target { get; private set; } | |
@@ -480,11 +483,28 @@ public virtual bool supportsUsingIl2cppCore | |||
| 480 | 483 | get { return true; } | |
| 481 | 484 | } | |
| 482 | 485 | ||
| 483 | - public virtual BuildReport buildReport | ||
| 486 | + public virtual bool development | ||
| 484 | 487 | { | |
| 485 | - get { return null; } | ||
| 488 | + get | ||
| 489 | + { | ||
| 490 | + if (buildReport != null) | ||
| 491 | + return (buildReport.summary.options & BuildOptions.Development) == BuildOptions.Development; | ||
| 492 | + return false; | ||
| 493 | + } | ||
| 486 | 494 | } | |
| 487 | 495 | ||
| 496 | + public virtual bool allowDebugging | ||
| 497 | + { | ||
| 498 | + get | ||
| 499 | + { | ||
| 500 | + if (buildReport != null) | ||
| 501 | + return (buildReport.summary.options & BuildOptions.AllowDebugging) == BuildOptions.AllowDebugging; | ||
| 502 | + return false; | ||
| 503 | + } | ||
| 504 | + } | ||
| 505 | + | ||
| 506 | + public BuildReport buildReport { get; private set; } | ||
| 507 | + | ||
| 488 | 508 | public virtual string[] includePaths | |
| 489 | 509 | { | |
| 490 | 510 | get | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -167,7 +167,7 @@ public static void SetVersionControl(IVersionControl instance) | |||
| 167 | 167 | } | |
| 168 | 168 | ||
| 169 | 169 | [UsedByNativeCode] | |
| 170 | - static bool HasVersionControl() | ||
| 170 | + internal static bool HasVersionControl() | ||
| 171 | 171 | { | |
| 172 | 172 | return s_VersionControlInstance != null; | |
| 173 | 173 | } | |
@@ -242,6 +242,18 @@ static bool SupportsAsyncChanges() | |||
| 242 | 242 | } | |
| 243 | 243 | } | |
| 244 | 244 | ||
| 245 | + internal static CollabStates GetAssetState(string assetGuid, string assetPath) | ||
| 246 | + { | ||
| 247 | + if (s_VersionControlInstance != null) | ||
| 248 | + { | ||
| 249 | + return s_VersionControlInstance.GetAssetState(assetGuid, assetPath); | ||
| 250 | + } | ||
| 251 | + else | ||
| 252 | + { | ||
| 253 | + return instance.GetAssetState(assetGuid); | ||
| 254 | + } | ||
| 255 | + } | ||
| 256 | + | ||
| 245 | 257 | // Static constructor for Collab | |
| 246 | 258 | static Collab() | |
| 247 | 259 | { | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -42,7 +42,7 @@ public static Collab.CollabStates GetAssetState(String assetGuid) | |||
| 42 | 42 | return Collab.CollabStates.kCollabNone; | |
| 43 | 43 | } | |
| 44 | 44 | ||
| 45 | - Collab.CollabStates assetState = Collab.instance.GetAssetState(assetGuid); | ||
| 45 | + Collab.CollabStates assetState = Collab.GetAssetState(assetGuid, AssetDatabase.GUIDToAssetPath(assetGuid)); | ||
| 46 | 46 | return assetState; | |
| 47 | 47 | } | |
| 48 | 48 | } | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -12,5 +12,6 @@ internal interface IVersionControl | |||
| 12 | 12 | void OnDisableVersionControl(); | |
| 13 | 13 | ChangeItem[] GetChanges(); | |
| 14 | 14 | void MergeDownloadedFiles(bool isFullDownload); | |
| 15 | + Collab.CollabStates GetAssetState(string assetGuid, string assetPath); | ||
| 15 | 16 | } | |
| 16 | 17 | } | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -0,0 +1,17 @@ | |||
| 1 | + // Unity C# reference source | ||
| 2 | + // Copyright (c) Unity Technologies. For terms of use, see | ||
| 3 | + // https://unity3d.com/legal/licenses/Unity_Reference_Only_License | ||
| 4 | + | ||
| 5 | + using UnityEngine; | ||
| 6 | + | ||
| 7 | + namespace UnityEditor | ||
| 8 | + { | ||
| 9 | + class SubToolbar | ||
| 10 | + { | ||
| 11 | + public float Width { get; set; } | ||
| 12 | + | ||
| 13 | + public virtual void OnGUI(Rect rect) | ||
| 14 | + { | ||
| 15 | + } | ||
| 16 | + } | ||
| 17 | + } // namespace | ||
| Back | FazBrowse Home | New Git URL |
0 commit comments