Skip to content

Commit

Permalink
Merge commit 'e44fe5d1d41c1db66b9d2bc0bb11f8fa60eab0b0'
Browse files Browse the repository at this point in the history
  • Loading branch information
eeropomell committed Jun 18, 2024
2 parents f040f7c + e44fe5d commit b81162e
Show file tree
Hide file tree
Showing 5 changed files with 27 additions and 12 deletions.
2 changes: 1 addition & 1 deletion Assets/Oculus/OculusProjectConfig.asset
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ MonoBehaviour:
m_Script: {fileID: 11500000, guid: 05d394ae2a81edd4cbc3c51917e766e3, type: 3}
m_Name: OculusProjectConfig
m_EditorClassIdentifier:
targetDeviceTypes: 0100000002000000
targetDeviceTypes: 02000000
allowOptional3DofHeadTracking: 0
handTrackingSupport: 0
handTrackingFrequency: 0
Expand Down
7 changes: 3 additions & 4 deletions Assets/PlatformConfigMobile.asset
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,9 @@ MonoBehaviour:
m_EditorClassIdentifier:
HullBrushMaxVertInputs: 400
HullBrushMaxKnots: 900
ReferenceImagesMaxFileSize: 10485760
ReferenceImagesMaxDimension: 4352
ReferenceImagesResizeDimension: 1024
ReferenceImagesMaxFileSize: 20000000
ReferenceImagesMaxDimension: 2785280
ReferenceImagesResizeDimension: 8192
MemoryWarningVertCount: 1000000
UseFileSystemWatcher: 1
EnableAutosave: 0
Expand All @@ -29,7 +29,6 @@ MonoBehaviour:
EnableExportGlb: 1
EnableExportJson: 0
EnableExportUsd: 0
EnableExportLatk: 1
EnableExportMemoryOptimization: 1
EnableMulticamPreview: 1
EnabledMulticamStyles: 000000000100000002000000
Expand Down
24 changes: 17 additions & 7 deletions Assets/Scripts/GUI/LoadBackgroundImageButton.cs
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,8 @@ public class LoadBackgroundImageButton : BaseButton
{
public ReferenceImage ReferenceImage { get; set; }

[SerializeField] private LocalizedString m_ErrorHelpText;

public void RefreshDescription()
{
if (ReferenceImage != null)
Expand All @@ -43,7 +45,7 @@ public void RefreshDescription()
}
override protected void OnButtonPressed()
{
if (ReferenceImage == null)
if (ReferenceImage == null || !ReferenceImage.Valid)
{
return;
}
Expand All @@ -54,16 +56,18 @@ override public void ResetState()
{
base.ResetState();

// Make ourselves unavailable if our image has an error.
bool available = false;
if (ReferenceImage != null)
if (ReferenceImage == null)
{
available = ReferenceImage.NotLoaded || ReferenceImage.Valid;
return;
}

if (available != IsAvailable())
if (!ReferenceImage.Valid)
{
SetButtonAvailable(available);
SetDescriptionText(App.ShortenForDescriptionText(ReferenceImage.FileName), ImageErrorExtraDescription());
}
else
{
SetDescriptionText(App.ShortenForDescriptionText(ReferenceImage.FileName));
}

RefreshDescription();
Expand All @@ -77,5 +81,11 @@ public void Set360ButtonTexture(Texture2D rTexture, float aspect = -1)
m_ButtonRenderer.material.SetFloat("_Stereoscopic", isStereo);
}


public string ImageErrorExtraDescription()
{
return m_ErrorHelpText.GetLocalizedStringAsync().Result;
}

}
} // namespace TiltBrush
5 changes: 5 additions & 0 deletions Assets/Scripts/GUI/LoadReferenceImageButton.cs
Original file line number Diff line number Diff line change
Expand Up @@ -15,13 +15,18 @@
using UnityEngine.Localization;
using UnityEngine;

using UnityEngine.Localization;
using UnityEngine;

namespace TiltBrush
{

public class LoadReferenceImageButton : BaseButton
{
public ReferenceImage ReferenceImage { get; set; }

[SerializeField] private LocalizedString m_ErrorHelpText;

public void RefreshDescription()
{
if (ReferenceImage != null)
Expand Down
1 change: 1 addition & 0 deletions Assets/Settings/Localization/Strings/Strings_en.asset
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ MonoBehaviour:
m_Script: {fileID: 11500000, guid: e9620f8c34305754d8cc9a7e49e852d9, type: 3}
m_Name: Strings_en
m_EditorClassIdentifier:
m_EditorClassIdentifier:
m_LocaleId:
m_Code: en
m_SharedData: {fileID: 11400000, guid: c84355079ab3f3e4f8f3812258805f86, type: 2}
Expand Down

0 comments on commit b81162e

Please sign in to comment.