Compare commits
5 Commits
3095469c4f
...
40ba0df92d
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
40ba0df92d | ||
|
|
b28e1f637d | ||
|
|
21e5206626 | ||
|
|
fc291cf116 | ||
|
|
7446e49c8f |
@@ -1,3 +1,4 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Threading;
|
||||
using Cysharp.Threading.Tasks;
|
||||
@@ -20,6 +21,7 @@ public interface IColoringController
|
||||
bool IsPlayingCompletionAnimation { get; }
|
||||
|
||||
bool HasNonAuthoredColors { get; }
|
||||
IDisposable UseNonZoomedView();
|
||||
void ResetAll();
|
||||
void Clear();
|
||||
}
|
||||
@@ -1,3 +1,4 @@
|
||||
using System;
|
||||
using System.Threading;
|
||||
using Cysharp.Threading.Tasks;
|
||||
using UnityEngine;
|
||||
@@ -7,6 +8,6 @@ namespace Darkmatter.Core.Contracts.Services.Capture
|
||||
public interface ICaptureService
|
||||
{
|
||||
UniTask<byte[]> CapturePngAsync(GameObject captureObject, float scale,
|
||||
CancellationToken cancellationToken = default);
|
||||
Func<IDisposable> captureViewScopeFactory = null, CancellationToken cancellationToken = default);
|
||||
}
|
||||
}
|
||||
@@ -1,7 +1,6 @@
|
||||
using System;
|
||||
using UnityEngine;
|
||||
|
||||
namespace Darkmatter.Features.Artbook
|
||||
{
|
||||
public record struct ArtbookEntry(string Id, string Name, Texture2D Thumbnail, DateTime UpdatedUtc);
|
||||
public record struct ArtbookEntry(string Id, string Name, DateTime UpdatedUtc);
|
||||
}
|
||||
|
||||
@@ -26,12 +26,13 @@ namespace Darkmatter.Features.Artbook
|
||||
private readonly IRewardedSaveGate _saveGate;
|
||||
|
||||
private readonly List<ArtbookEntry> _entries = new();
|
||||
private readonly List<Sprite> _ownedSprites = new();
|
||||
private readonly List<Texture2D> _ownedTextures = new();
|
||||
private readonly List<Sprite> _visibleSprites = new();
|
||||
private readonly List<Texture2D> _visibleTextures = new();
|
||||
private Action _onClose;
|
||||
private CancellationTokenSource _cts;
|
||||
private IDisposable _openSubscription;
|
||||
private int _currentSpread;
|
||||
private int _renderVersion;
|
||||
|
||||
public ArtbookPresenter(
|
||||
ArtbookView view,
|
||||
@@ -75,33 +76,40 @@ namespace Darkmatter.Features.Artbook
|
||||
|
||||
private async UniTaskVoid LoadAndShowAsync(CancellationToken ct)
|
||||
{
|
||||
ClearOwnedAssets();
|
||||
_entries.Clear();
|
||||
_currentSpread = 0;
|
||||
|
||||
await _catalog.FetchAsync();
|
||||
if (ct.IsCancellationRequested) return;
|
||||
|
||||
foreach (var id in _catalog.AllTemplateIds)
|
||||
try
|
||||
{
|
||||
ClearVisibleAssets();
|
||||
_entries.Clear();
|
||||
_currentSpread = 0;
|
||||
|
||||
await _catalog.FetchAsync();
|
||||
if (ct.IsCancellationRequested) return;
|
||||
|
||||
var progress = _progression.GetProgress(id);
|
||||
if (progress is not { hasThumbnail: true }) continue;
|
||||
foreach (var id in _catalog.AllTemplateIds)
|
||||
{
|
||||
if (ct.IsCancellationRequested) return;
|
||||
|
||||
var texture = await _progression.GetCachedThumbnailAsync(id);
|
||||
if (ct.IsCancellationRequested) return;
|
||||
if (texture == null) continue;
|
||||
var progress = _progression.GetProgress(id);
|
||||
if (progress is not { hasThumbnail: true }) continue;
|
||||
|
||||
var template = await _catalog.LoadAsync(id);
|
||||
if (ct.IsCancellationRequested) return;
|
||||
var template = await _catalog.LoadAsync(id);
|
||||
if (ct.IsCancellationRequested) return;
|
||||
if (template == null) continue;
|
||||
|
||||
_ownedTextures.Add(texture);
|
||||
_entries.Add(new ArtbookEntry(id, template.DisplayName, texture, progress.Value.UpdatedUtc));
|
||||
_entries.Add(new ArtbookEntry(id, template.DisplayName, progress.Value.UpdatedUtc));
|
||||
}
|
||||
|
||||
_entries.Sort((a, b) => b.UpdatedUtc.CompareTo(a.UpdatedUtc));
|
||||
RenderSpread();
|
||||
}
|
||||
catch (OperationCanceledException)
|
||||
{
|
||||
// Opening/closing the art book can cancel the load at any await point.
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
Debug.LogError($"[Artbook] Failed to load entries: {e}");
|
||||
}
|
||||
|
||||
_entries.Sort((a, b) => b.UpdatedUtc.CompareTo(a.UpdatedUtc));
|
||||
RenderSpread();
|
||||
}
|
||||
|
||||
private void HandlePrevSpreadClicked()
|
||||
@@ -122,7 +130,7 @@ namespace Darkmatter.Features.Artbook
|
||||
|
||||
private void RenderSpread()
|
||||
{
|
||||
_view.SetSpread(GetLeftEntry(), SpriteFor(GetLeftEntry()), GetRightEntry(), SpriteFor(GetRightEntry()));
|
||||
RenderSpreadAsync(++_renderVersion, _cts?.Token ?? CancellationToken.None).Forget();
|
||||
_view.SetNavigation(_currentSpread > 0, _currentSpread < TotalSpreads - 1);
|
||||
}
|
||||
|
||||
@@ -138,13 +146,51 @@ namespace Darkmatter.Features.Artbook
|
||||
return idx < _entries.Count ? _entries[idx] : null;
|
||||
}
|
||||
|
||||
private Sprite SpriteFor(ArtbookEntry? entry)
|
||||
private async UniTaskVoid RenderSpreadAsync(int version, CancellationToken ct)
|
||||
{
|
||||
if (!entry.HasValue) return null;
|
||||
var tex = entry.Value.Thumbnail;
|
||||
var left = GetLeftEntry();
|
||||
var right = GetRightEntry();
|
||||
ClearVisibleAssets();
|
||||
_view.SetSpread(left, null, right, null);
|
||||
|
||||
try
|
||||
{
|
||||
var leftSprite = await SpriteForAsync(left, version, ct);
|
||||
var rightSprite = await SpriteForAsync(right, version, ct);
|
||||
if (ct.IsCancellationRequested || version != _renderVersion)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
_view.SetSpread(left, leftSprite, right, rightSprite);
|
||||
}
|
||||
catch (OperationCanceledException)
|
||||
{
|
||||
if (version == _renderVersion) ClearVisibleAssets();
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
if (version == _renderVersion) ClearVisibleAssets();
|
||||
Debug.LogError($"[Artbook] Failed to render spread: {e}");
|
||||
}
|
||||
}
|
||||
|
||||
private async UniTask<Sprite> SpriteForAsync(ArtbookEntry? entry, int version, CancellationToken ct)
|
||||
{
|
||||
if (!entry.HasValue || ct.IsCancellationRequested || version != _renderVersion) return null;
|
||||
|
||||
var tex = await _progression.GetCachedThumbnailAsync(entry.Value.Id);
|
||||
if (ct.IsCancellationRequested || version != _renderVersion)
|
||||
{
|
||||
if (tex != null) UnityEngine.Object.Destroy(tex);
|
||||
return null;
|
||||
}
|
||||
|
||||
if (tex == null) return null;
|
||||
|
||||
var sprite = Sprite.Create(tex, new Rect(0, 0, tex.width, tex.height), new Vector2(0.5f, 0.5f), 100f);
|
||||
_ownedSprites.Add(sprite);
|
||||
_visibleTextures.Add(tex);
|
||||
_visibleSprites.Add(sprite);
|
||||
return sprite;
|
||||
}
|
||||
|
||||
@@ -153,13 +199,32 @@ namespace Darkmatter.Features.Artbook
|
||||
|
||||
private async UniTaskVoid SaveToGalleryAsync(ArtbookEntry? entry)
|
||||
{
|
||||
if (!entry.HasValue || entry.Value.Thumbnail == null) return;
|
||||
var ct = _cts?.Token ?? CancellationToken.None;
|
||||
// Same kid-friendly prompt + rewarded ad as the gameplay save button.
|
||||
if (!await _saveGate.RequestSaveAsync(ct)) return;
|
||||
await _gallery.SaveImageAsync(entry.Value.Thumbnail, entry.Value.Name, ct);
|
||||
// The art book has no success popup of its own, so use the shared toast.
|
||||
await _saveGate.ShowSavedAsync(ct);
|
||||
Texture2D texture = null;
|
||||
try
|
||||
{
|
||||
if (!entry.HasValue) return;
|
||||
var ct = _cts?.Token ?? CancellationToken.None;
|
||||
// Same kid-friendly prompt + rewarded ad as the gameplay save button.
|
||||
if (!await _saveGate.RequestSaveAsync(ct)) return;
|
||||
texture = await _progression.GetCachedThumbnailAsync(entry.Value.Id);
|
||||
if (texture == null) return;
|
||||
|
||||
await _gallery.SaveImageAsync(texture, entry.Value.Name, ct);
|
||||
// The art book has no success popup of its own, so use the shared toast.
|
||||
await _saveGate.ShowSavedAsync(ct);
|
||||
}
|
||||
catch (OperationCanceledException)
|
||||
{
|
||||
// The art book was closed or replaced while saving.
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
Debug.LogError($"[Artbook] Failed to save page: {e}");
|
||||
}
|
||||
finally
|
||||
{
|
||||
if (texture != null) UnityEngine.Object.Destroy(texture);
|
||||
}
|
||||
}
|
||||
|
||||
private void HandleLeftEditClicked() => OpenForEdit(GetLeftEntry());
|
||||
@@ -169,27 +234,43 @@ namespace Darkmatter.Features.Artbook
|
||||
{
|
||||
if (!entry.HasValue) return;
|
||||
_eventBus.Publish(new DrawingSelectedSignal(entry.Value.Id));
|
||||
StopActiveWork();
|
||||
_view.Hide();
|
||||
}
|
||||
|
||||
private void HandleBackButtonClicked()
|
||||
{
|
||||
_onClose?.Invoke();
|
||||
StopActiveWork();
|
||||
_view.Hide();
|
||||
}
|
||||
|
||||
private void HandleColorbookButtonClicked()
|
||||
{
|
||||
_eventBus.Publish(new OpenColorBookSignal());
|
||||
StopActiveWork();
|
||||
_view.Hide();
|
||||
}
|
||||
|
||||
private void StopActiveWork()
|
||||
{
|
||||
_renderVersion++;
|
||||
_cts?.Cancel();
|
||||
_view.SetSpread(null, null, null, null);
|
||||
ClearVisibleAssets();
|
||||
}
|
||||
|
||||
private void ClearOwnedAssets()
|
||||
{
|
||||
foreach (var s in _ownedSprites) UnityEngine.Object.Destroy(s);
|
||||
foreach (var t in _ownedTextures) UnityEngine.Object.Destroy(t);
|
||||
_ownedSprites.Clear();
|
||||
_ownedTextures.Clear();
|
||||
ClearVisibleAssets();
|
||||
}
|
||||
|
||||
private void ClearVisibleAssets()
|
||||
{
|
||||
foreach (var s in _visibleSprites) UnityEngine.Object.Destroy(s);
|
||||
foreach (var t in _visibleTextures) UnityEngine.Object.Destroy(t);
|
||||
_visibleSprites.Clear();
|
||||
_visibleTextures.Clear();
|
||||
}
|
||||
|
||||
public void Dispose()
|
||||
|
||||
@@ -51,7 +51,11 @@ namespace Darkmatter.Features.Capture
|
||||
// A null result keeps the existing thumbnail and skips the gallery write (both no-op on null).
|
||||
if (_coloring.IsPlayingCompletionAnimation) return null;
|
||||
|
||||
var png = await _captureService.CapturePngAsync(_refs.PaperRoot.gameObject, _config.CaptureScale, ct);
|
||||
var png = await _captureService.CapturePngAsync(
|
||||
_refs.PaperRoot.gameObject,
|
||||
_config.CaptureScale,
|
||||
_coloring.UseNonZoomedView,
|
||||
ct);
|
||||
if (!saveToGallery || png == null || png.Length == 0) return png;
|
||||
|
||||
var tex = new Texture2D(2, 2, TextureFormat.RGBA32, mipChain: false);
|
||||
|
||||
@@ -8,7 +8,8 @@
|
||||
"GUID:b4c9f7fbf1e144933a1797dc208ece5f",
|
||||
"GUID:b0214a6008ed146ff8f122a6a9c2f6cc",
|
||||
"GUID:f51ebe6a0ceec4240a699833d6309b23",
|
||||
"GUID:80ecb87cae9c44d19824e70ea7229748"
|
||||
"GUID:80ecb87cae9c44d19824e70ea7229748",
|
||||
"GUID:75469ad4d38634e559750d17036d5f7c"
|
||||
],
|
||||
"includePlatforms": [],
|
||||
"excludePlatforms": [],
|
||||
|
||||
@@ -11,6 +11,7 @@ namespace Darkmatter.Features.Coloring
|
||||
public class ColoringFeatureModule : MonoBehaviour, IModule
|
||||
{
|
||||
[SerializeField] private ColorPaletteHolderView paletteHolderView;
|
||||
[SerializeField] private ColoringPinchZoomController pinchZoomController;
|
||||
|
||||
public void Register(IContainerBuilder builder)
|
||||
{
|
||||
@@ -20,6 +21,7 @@ namespace Darkmatter.Features.Coloring
|
||||
builder.RegisterEntryPoint<ColorPaletteHolderPresenter>().WithParameter(paletteHolderView);
|
||||
}
|
||||
|
||||
builder.RegisterComponent(pinchZoomController);
|
||||
builder.Register<IColorButtonFactory, ColorButtonFactory>(Lifetime.Singleton);
|
||||
builder.Register<ColoringStateRepository>(Lifetime.Singleton);
|
||||
builder.Register<IColoringController, ColoringController>(Lifetime.Singleton);
|
||||
|
||||
@@ -33,6 +33,7 @@ public class ColoringController : IColoringController, IDisposable
|
||||
private GameObject _colorButtonPrefab;
|
||||
private GameObject _completionAnimationInstance;
|
||||
private CompletionAnimationView _completionAnimationView;
|
||||
private readonly ColoringPinchZoomController _pinchZoom;
|
||||
private bool _isPlayingCompletionAnimation;
|
||||
private readonly List<ColorRegionView> _regions = new();
|
||||
private readonly List<ColorButton> _buttons = new();
|
||||
@@ -41,6 +42,7 @@ public class ColoringController : IColoringController, IDisposable
|
||||
public ColoringController(
|
||||
ColoringStateRepository repository,
|
||||
IColorButtonFactory buttonFactory,
|
||||
ColoringPinchZoomController pinchZoom,
|
||||
IEventBus bus,
|
||||
IAssetProviderService assetProviderService,
|
||||
IUndoStack history,
|
||||
@@ -52,6 +54,7 @@ public class ColoringController : IColoringController, IDisposable
|
||||
_bus = bus;
|
||||
_assetProviderService = assetProviderService;
|
||||
_history = history;
|
||||
_pinchZoom = pinchZoom;
|
||||
_refs = refs;
|
||||
_paletteHolder = paletteHolder;
|
||||
}
|
||||
@@ -60,7 +63,7 @@ public class ColoringController : IColoringController, IDisposable
|
||||
IReadOnlyDictionary<string, Color> savedColors, CancellationToken ct)
|
||||
{
|
||||
Clear();
|
||||
_paletteHolder.Show();
|
||||
_ = _paletteHolder.Show();
|
||||
await TryLoadColorButtonPrefabAsync(ct);
|
||||
ct.ThrowIfCancellationRequested();
|
||||
await TryLoadColorPaletteAsync(template, ct);
|
||||
@@ -110,6 +113,8 @@ public class ColoringController : IColoringController, IDisposable
|
||||
{
|
||||
if (_completionAnimationInstance == null || _completionAnimationView == null) return;
|
||||
if (_colorInstance != null) _colorInstance.SetActive(false);
|
||||
if (_pinchZoom != null)
|
||||
_pinchZoom.ResetZoom();
|
||||
_completionAnimationInstance.SetActive(true);
|
||||
_isPlayingCompletionAnimation = true;
|
||||
try
|
||||
@@ -138,6 +143,14 @@ public class ColoringController : IColoringController, IDisposable
|
||||
}
|
||||
}
|
||||
|
||||
public IDisposable UseNonZoomedView()
|
||||
{
|
||||
if (_pinchZoom == null)
|
||||
return null;
|
||||
|
||||
return _pinchZoom.UseNonZoomedView();
|
||||
}
|
||||
|
||||
public void ResetAll()
|
||||
{
|
||||
if (_regions.Count == 0) return;
|
||||
@@ -175,6 +188,9 @@ public class ColoringController : IColoringController, IDisposable
|
||||
UnityEngine.Object.Destroy(_colorInstance);
|
||||
_colorInstance = null;
|
||||
}
|
||||
|
||||
if (_pinchZoom != null)
|
||||
_pinchZoom.SetTarget(null);
|
||||
}
|
||||
|
||||
public void Dispose() => Clear();
|
||||
@@ -182,6 +198,7 @@ public class ColoringController : IColoringController, IDisposable
|
||||
private void InitializeColorRegions(IDrawingTemplate template, IReadOnlyDictionary<string, Color> savedColors)
|
||||
{
|
||||
_colorInstance = UnityEngine.Object.Instantiate(template.ColoringPrefab, _refs.PaperRoot);
|
||||
InitializePinchZoom(_refs.PaperRoot);
|
||||
if (template.CompletionAnimationPrefab != null)
|
||||
{
|
||||
_completionAnimationInstance = UnityEngine.Object.Instantiate(template.CompletionAnimationPrefab, _refs.PaperRoot);
|
||||
@@ -207,6 +224,17 @@ public class ColoringController : IColoringController, IDisposable
|
||||
}
|
||||
}
|
||||
|
||||
private void InitializePinchZoom(RectTransform target)
|
||||
{
|
||||
if (target == null)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
if (_pinchZoom != null)
|
||||
_pinchZoom.SetTarget(target);
|
||||
}
|
||||
|
||||
private async UniTask TryLoadColorButtonPrefabAsync(CancellationToken ct)
|
||||
{
|
||||
if (_colorButtonPrefab != null) return;
|
||||
|
||||
@@ -0,0 +1,289 @@
|
||||
using System;
|
||||
using UnityEngine;
|
||||
using UnityEngine.InputSystem;
|
||||
|
||||
namespace Darkmatter.Features.Coloring.Systems
|
||||
{
|
||||
|
||||
public sealed class ColoringPinchZoomController : MonoBehaviour
|
||||
{
|
||||
private const float MinimumPinchDistance = 8f;
|
||||
|
||||
[SerializeField] private float minZoom = 1f;
|
||||
[SerializeField] private float maxZoom = 3f;
|
||||
[SerializeField] private float scrollZoomSensitivity = 0.0015f;
|
||||
|
||||
private RectTransform _target;
|
||||
private RectTransform _parent;
|
||||
private Canvas _canvas;
|
||||
private Camera _eventCamera;
|
||||
|
||||
private bool _isPinching;
|
||||
private float _currentZoom = 1f;
|
||||
private Vector3 _baseScale = Vector3.one;
|
||||
private Vector2 _baseAnchoredPosition;
|
||||
|
||||
public void SetTarget(RectTransform target)
|
||||
{
|
||||
ResetZoom();
|
||||
_target = target;
|
||||
_parent = target != null ? target.parent as RectTransform : null;
|
||||
_canvas = target != null ? target.GetComponentInParent<Canvas>() : null;
|
||||
_eventCamera = ResolveEventCamera(_canvas);
|
||||
_baseScale = target != null ? target.localScale : Vector3.one;
|
||||
_baseAnchoredPosition = target != null ? target.anchoredPosition : Vector2.zero;
|
||||
_currentZoom = 1f;
|
||||
enabled = _target != null && _parent != null;
|
||||
}
|
||||
|
||||
public void ResetZoom()
|
||||
{
|
||||
if (_target != null)
|
||||
{
|
||||
_target.localScale = _baseScale;
|
||||
_target.anchoredPosition = _baseAnchoredPosition;
|
||||
}
|
||||
|
||||
_currentZoom = 1f;
|
||||
_isPinching = false;
|
||||
}
|
||||
|
||||
public IDisposable UseNonZoomedView()
|
||||
{
|
||||
if (_target == null)
|
||||
return null;
|
||||
|
||||
var state = new ViewState(_target.localScale, _target.anchoredPosition, _currentZoom);
|
||||
ResetZoom();
|
||||
return new NonZoomedViewScope(this, state);
|
||||
}
|
||||
|
||||
private void Awake()
|
||||
{
|
||||
enabled = false;
|
||||
}
|
||||
|
||||
private void Update()
|
||||
{
|
||||
if (_target == null || _parent == null)
|
||||
{
|
||||
enabled = false;
|
||||
return;
|
||||
}
|
||||
|
||||
if (TryApplyPinchZoom())
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
_isPinching = false;
|
||||
TryApplyScrollZoom();
|
||||
}
|
||||
|
||||
private bool TryApplyPinchZoom()
|
||||
{
|
||||
if (!TryGetTouchSamples(out TouchSample firstTouch, out TouchSample secondTouch))
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
float distance = Vector2.Distance(firstTouch.Position, secondTouch.Position);
|
||||
if (distance < MinimumPinchDistance)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
Vector2 midpoint = (firstTouch.Position + secondTouch.Position) * 0.5f;
|
||||
if (!TryGetParentLocalPoint(midpoint, out Vector2 midpointLocal))
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
if (!_isPinching)
|
||||
{
|
||||
_isPinching = true;
|
||||
return true;
|
||||
}
|
||||
|
||||
float previousDistance = Vector2.Distance(firstTouch.PreviousPosition, secondTouch.PreviousPosition);
|
||||
if (previousDistance < MinimumPinchDistance)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
float targetZoom = Mathf.Clamp(_currentZoom * (distance / previousDistance), minZoom, maxZoom);
|
||||
ZoomTowards(midpointLocal, targetZoom);
|
||||
return true;
|
||||
}
|
||||
|
||||
private void TryApplyScrollZoom()
|
||||
{
|
||||
Mouse mouse = Mouse.current;
|
||||
if (mouse == null)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
float scroll = mouse.scroll.ReadValue().y;
|
||||
if (Mathf.Approximately(scroll, 0f))
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
Vector2 screenPosition = mouse.position.ReadValue();
|
||||
if (!IsInputPointAllowed(screenPosition))
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
if (!TryGetParentLocalPoint(screenPosition, out Vector2 localPoint))
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
float targetZoom = Mathf.Clamp(_currentZoom * (1f + scroll * scrollZoomSensitivity), minZoom, maxZoom);
|
||||
ZoomTowards(localPoint, targetZoom);
|
||||
}
|
||||
|
||||
private void ZoomTowards(Vector2 parentLocalPoint, float targetZoom)
|
||||
{
|
||||
if (Mathf.Approximately(targetZoom, _currentZoom))
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
Vector2 contentPoint = (parentLocalPoint - _target.anchoredPosition) / _currentZoom;
|
||||
_currentZoom = targetZoom;
|
||||
_target.localScale = _baseScale * _currentZoom;
|
||||
_target.anchoredPosition = Mathf.Approximately(_currentZoom, minZoom)
|
||||
? _baseAnchoredPosition
|
||||
: parentLocalPoint - contentPoint * _currentZoom;
|
||||
}
|
||||
|
||||
private bool TryGetParentLocalPoint(Vector2 screenPoint, out Vector2 localPoint)
|
||||
{
|
||||
return RectTransformUtility.ScreenPointToLocalPointInRectangle(_parent, screenPoint, _eventCamera,
|
||||
out localPoint);
|
||||
}
|
||||
|
||||
private bool TryGetTouchSamples(out TouchSample firstTouch, out TouchSample secondTouch)
|
||||
{
|
||||
firstTouch = default;
|
||||
secondTouch = default;
|
||||
|
||||
Touchscreen touchscreen = Touchscreen.current;
|
||||
if (touchscreen == null)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
int count = 0;
|
||||
foreach (var touchControl in touchscreen.touches)
|
||||
{
|
||||
if (!touchControl.press.isPressed)
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
||||
Vector2 position = touchControl.position.ReadValue();
|
||||
if (!IsInputPointAllowed(position))
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
||||
var sample = new TouchSample(position, touchControl.delta.ReadValue());
|
||||
if (count == 0)
|
||||
{
|
||||
firstTouch = sample;
|
||||
}
|
||||
else
|
||||
{
|
||||
secondTouch = sample;
|
||||
return true;
|
||||
}
|
||||
|
||||
count++;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
private bool IsInputPointAllowed(Vector2 screenPoint)
|
||||
{
|
||||
return _target != null &&
|
||||
RectTransformUtility.RectangleContainsScreenPoint(_target, screenPoint, _eventCamera);
|
||||
}
|
||||
|
||||
private static Camera ResolveEventCamera(Canvas canvas)
|
||||
{
|
||||
if (canvas == null || canvas.renderMode == RenderMode.ScreenSpaceOverlay)
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
||||
return canvas.worldCamera;
|
||||
}
|
||||
|
||||
private void RestoreView(ViewState state)
|
||||
{
|
||||
if (_target == null)
|
||||
return;
|
||||
|
||||
_target.localScale = state.Scale;
|
||||
_target.anchoredPosition = state.AnchoredPosition;
|
||||
_currentZoom = state.CurrentZoom;
|
||||
_isPinching = false;
|
||||
}
|
||||
|
||||
private readonly struct ViewState
|
||||
{
|
||||
public readonly Vector3 Scale;
|
||||
public readonly Vector2 AnchoredPosition;
|
||||
public readonly float CurrentZoom;
|
||||
|
||||
public ViewState(Vector3 scale, Vector2 anchoredPosition, float currentZoom)
|
||||
{
|
||||
Scale = scale;
|
||||
AnchoredPosition = anchoredPosition;
|
||||
CurrentZoom = currentZoom;
|
||||
}
|
||||
}
|
||||
|
||||
private sealed class NonZoomedViewScope : IDisposable
|
||||
{
|
||||
private ColoringPinchZoomController _controller;
|
||||
private readonly ViewState _state;
|
||||
|
||||
public NonZoomedViewScope(ColoringPinchZoomController controller, ViewState state)
|
||||
{
|
||||
_controller = controller;
|
||||
_state = state;
|
||||
}
|
||||
|
||||
public void Dispose()
|
||||
{
|
||||
if (_controller == null)
|
||||
return;
|
||||
|
||||
if (_controller != null)
|
||||
_controller.RestoreView(_state);
|
||||
|
||||
_controller = null;
|
||||
}
|
||||
}
|
||||
|
||||
private readonly struct TouchSample
|
||||
{
|
||||
public readonly Vector2 Position;
|
||||
public readonly Vector2 PreviousPosition;
|
||||
public readonly Vector2 Delta;
|
||||
|
||||
public TouchSample(Vector2 position, Vector2 delta)
|
||||
{
|
||||
Position = position;
|
||||
PreviousPosition = position - delta;
|
||||
Delta = delta;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: ddf9e0ad8b4b4ee59470410f7cf40689
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -1,3 +1,4 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Threading;
|
||||
using Cysharp.Threading.Tasks;
|
||||
@@ -5,6 +6,7 @@ using Darkmatter.Core.Contracts.Services.Camera;
|
||||
using Darkmatter.Core.Contracts.Services.Capture;
|
||||
using UnityEngine;
|
||||
using CameraType = Darkmatter.Core.Enums.Services.Camera.CameraType;
|
||||
using Object = UnityEngine.Object;
|
||||
|
||||
namespace Darkmatter.Services.Capture
|
||||
{
|
||||
@@ -15,7 +17,7 @@ namespace Darkmatter.Services.Capture
|
||||
public CaptureService(ICameraService cameraService) => _cameraService = cameraService;
|
||||
|
||||
public async UniTask<byte[]> CapturePngAsync(GameObject captureObject, float scale,
|
||||
CancellationToken cancellationToken = default)
|
||||
Func<IDisposable> captureViewScopeFactory = null, CancellationToken cancellationToken = default)
|
||||
{
|
||||
if (captureObject == null) return null;
|
||||
var paperRT = captureObject.transform as RectTransform;
|
||||
@@ -26,10 +28,6 @@ namespace Darkmatter.Services.Capture
|
||||
int sw = Screen.width;
|
||||
int sh = Screen.height;
|
||||
|
||||
Rect crop = ComputeCropRect(captureObject, sw, sh);
|
||||
int cropW = Mathf.Max(1, (int)crop.width);
|
||||
int cropH = Mathf.Max(1, (int)crop.height);
|
||||
|
||||
var prevFlags = cam.clearFlags;
|
||||
var prevBg = cam.backgroundColor;
|
||||
var prevTarget = cam.targetTexture;
|
||||
@@ -41,15 +39,22 @@ namespace Darkmatter.Services.Capture
|
||||
|
||||
List<Canvas> disabledCanvases = null;
|
||||
List<UnityEngine.UI.Graphic> disabledGraphics = null;
|
||||
IDisposable captureViewScope = null;
|
||||
|
||||
try
|
||||
{
|
||||
await UniTask.WaitForEndOfFrame(cancellationToken);
|
||||
|
||||
captureViewScope = captureViewScopeFactory?.Invoke();
|
||||
|
||||
disabledCanvases = DisableOtherRootCanvases(paperCanvas);
|
||||
disabledGraphics = HideNonPaperGraphics(paperRT);
|
||||
HideBackdropGraphics(paperRT, disabledGraphics);
|
||||
|
||||
Rect crop = ComputeCropRect(captureObject, sw, sh);
|
||||
int cropW = Mathf.Max(1, (int)crop.width);
|
||||
int cropH = Mathf.Max(1, (int)crop.height);
|
||||
|
||||
cam.clearFlags = CameraClearFlags.SolidColor;
|
||||
cam.backgroundColor = new Color(0f, 0f, 0f, 0f);
|
||||
cam.targetTexture = rt;
|
||||
@@ -67,6 +72,8 @@ namespace Darkmatter.Services.Capture
|
||||
fullScreen.ReadPixels(new Rect(0, 0, sw, sh), 0, 0);
|
||||
fullScreen.Apply();
|
||||
RenderTexture.active = prevActive;
|
||||
captureViewScope?.Dispose();
|
||||
captureViewScope = null;
|
||||
|
||||
try
|
||||
{
|
||||
@@ -118,6 +125,7 @@ namespace Darkmatter.Services.Capture
|
||||
foreach (var c in disabledCanvases)
|
||||
if (c != null)
|
||||
c.enabled = true;
|
||||
captureViewScope?.Dispose();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
File diff suppressed because one or more lines are too long
@@ -60,236 +60,8 @@ MonoBehaviour:
|
||||
m_SourceFontFilePath:
|
||||
m_AtlasPopulationMode: 1
|
||||
InternalDynamicOS: 0
|
||||
m_GlyphTable:
|
||||
- m_Index: 217
|
||||
m_Metrics:
|
||||
m_Width: 67.78125
|
||||
m_Height: 17.28125
|
||||
m_HorizontalBearingX: 2.25
|
||||
m_HorizontalBearingY: 16.375
|
||||
m_HorizontalAdvance: 72.265625
|
||||
m_GlyphRect:
|
||||
m_X: 10
|
||||
m_Y: 10
|
||||
m_Width: 69
|
||||
m_Height: 18
|
||||
m_Scale: 1
|
||||
m_AtlasIndex: 0
|
||||
m_ClassDefinitionType: 0
|
||||
- m_Index: 231
|
||||
m_Metrics:
|
||||
m_Width: 68.3125
|
||||
m_Height: 13.234375
|
||||
m_HorizontalBearingX: 0.453125
|
||||
m_HorizontalBearingY: -6.65625
|
||||
m_HorizontalAdvance: 69.125
|
||||
m_GlyphRect:
|
||||
m_X: 98
|
||||
m_Y: 10
|
||||
m_Width: 69
|
||||
m_Height: 14
|
||||
m_Scale: 1
|
||||
m_AtlasIndex: 0
|
||||
m_ClassDefinitionType: 0
|
||||
- m_Index: 276
|
||||
m_Metrics:
|
||||
m_Width: 51.75
|
||||
m_Height: 59.671875
|
||||
m_HorizontalBearingX: 0.453125
|
||||
m_HorizontalBearingY: 58.6875
|
||||
m_HorizontalAdvance: 52.46875
|
||||
m_GlyphRect:
|
||||
m_X: 186
|
||||
m_Y: 10
|
||||
m_Width: 53
|
||||
m_Height: 60
|
||||
m_Scale: 1
|
||||
m_AtlasIndex: 0
|
||||
m_ClassDefinitionType: 0
|
||||
- m_Index: 208
|
||||
m_Metrics:
|
||||
m_Width: 0
|
||||
m_Height: 0
|
||||
m_HorizontalBearingX: 0
|
||||
m_HorizontalBearingY: 0
|
||||
m_HorizontalAdvance: 21.15625
|
||||
m_GlyphRect:
|
||||
m_X: 0
|
||||
m_Y: 0
|
||||
m_Width: 0
|
||||
m_Height: 0
|
||||
m_Scale: 1
|
||||
m_AtlasIndex: 0
|
||||
m_ClassDefinitionType: 0
|
||||
- m_Index: 9
|
||||
m_Metrics:
|
||||
m_Width: 50.3125
|
||||
m_Height: 63
|
||||
m_HorizontalBearingX: 2.703125
|
||||
m_HorizontalBearingY: 62.28125
|
||||
m_HorizontalAdvance: 54.8125
|
||||
m_GlyphRect:
|
||||
m_X: 98
|
||||
m_Y: 43
|
||||
m_Width: 52
|
||||
m_Height: 64
|
||||
m_Scale: 1
|
||||
m_AtlasIndex: 0
|
||||
m_ClassDefinitionType: 0
|
||||
- m_Index: 62
|
||||
m_Metrics:
|
||||
m_Width: 46.09375
|
||||
m_Height: 45.53125
|
||||
m_HorizontalBearingX: 1.34375
|
||||
m_HorizontalBearingY: 44.90625
|
||||
m_HorizontalAdvance: 50.125
|
||||
m_GlyphRect:
|
||||
m_X: 10
|
||||
m_Y: 47
|
||||
m_Width: 47
|
||||
m_Height: 46
|
||||
m_Scale: 1
|
||||
m_AtlasIndex: 0
|
||||
m_ClassDefinitionType: 0
|
||||
- m_Index: 71
|
||||
m_Metrics:
|
||||
m_Width: 40.953125
|
||||
m_Height: 46.71875
|
||||
m_HorizontalBearingX: 2.25
|
||||
m_HorizontalBearingY: 45.453125
|
||||
m_HorizontalAdvance: 45.265625
|
||||
m_GlyphRect:
|
||||
m_X: 10
|
||||
m_Y: 112
|
||||
m_Width: 42
|
||||
m_Height: 48
|
||||
m_Scale: 1
|
||||
m_AtlasIndex: 0
|
||||
m_ClassDefinitionType: 0
|
||||
- m_Index: 90
|
||||
m_Metrics:
|
||||
m_Width: 42.296875
|
||||
m_Height: 67.40625
|
||||
m_HorizontalBearingX: 3.15625
|
||||
m_HorizontalBearingY: 65.703125
|
||||
m_HorizontalAdvance: 46.078125
|
||||
m_GlyphRect:
|
||||
m_X: 258
|
||||
m_Y: 10
|
||||
m_Width: 43
|
||||
m_Height: 68
|
||||
m_Scale: 1
|
||||
m_AtlasIndex: 0
|
||||
m_ClassDefinitionType: 0
|
||||
- m_Index: 32
|
||||
m_Metrics:
|
||||
m_Width: 55.265625
|
||||
m_Height: 62.90625
|
||||
m_HorizontalBearingX: 2.515625
|
||||
m_HorizontalBearingY: 62.09375
|
||||
m_HorizontalAdvance: 60.296875
|
||||
m_GlyphRect:
|
||||
m_X: 169
|
||||
m_Y: 89
|
||||
m_Width: 56
|
||||
m_Height: 64
|
||||
m_Scale: 1
|
||||
m_AtlasIndex: 0
|
||||
m_ClassDefinitionType: 0
|
||||
- m_Index: 75
|
||||
m_Metrics:
|
||||
m_Width: 45.453125
|
||||
m_Height: 47.703125
|
||||
m_HorizontalBearingX: 1.34375
|
||||
m_HorizontalBearingY: 45.90625
|
||||
m_HorizontalAdvance: 48.15625
|
||||
m_GlyphRect:
|
||||
m_X: 71
|
||||
m_Y: 126
|
||||
m_Width: 46
|
||||
m_Height: 48
|
||||
m_Scale: 1
|
||||
m_AtlasIndex: 0
|
||||
m_ClassDefinitionType: 0
|
||||
- m_Index: 119
|
||||
m_Metrics:
|
||||
m_Width: 47.328125
|
||||
m_Height: 47.6875
|
||||
m_HorizontalBearingX: 0.546875
|
||||
m_HorizontalBearingY: 45.984375
|
||||
m_HorizontalAdvance: 48.421875
|
||||
m_GlyphRect:
|
||||
m_X: 320
|
||||
m_Y: 10
|
||||
m_Width: 48
|
||||
m_Height: 48
|
||||
m_Scale: 1
|
||||
m_AtlasIndex: 0
|
||||
m_ClassDefinitionType: 0
|
||||
- m_Index: 111
|
||||
m_Metrics:
|
||||
m_Width: 36.796875
|
||||
m_Height: 60.84375
|
||||
m_HorizontalBearingX: 0.90625
|
||||
m_HorizontalBearingY: 60.03125
|
||||
m_HorizontalAdvance: 38.609375
|
||||
m_GlyphRect:
|
||||
m_X: 10
|
||||
m_Y: 179
|
||||
m_Width: 38
|
||||
m_Height: 62
|
||||
m_Scale: 1
|
||||
m_AtlasIndex: 0
|
||||
m_ClassDefinitionType: 0
|
||||
m_CharacterTable:
|
||||
- m_ElementType: 1
|
||||
m_Unicode: 8230
|
||||
m_GlyphIndex: 217
|
||||
m_Scale: 1
|
||||
- m_ElementType: 1
|
||||
m_Unicode: 95
|
||||
m_GlyphIndex: 231
|
||||
m_Scale: 1
|
||||
- m_ElementType: 1
|
||||
m_Unicode: 60
|
||||
m_GlyphIndex: 276
|
||||
m_Scale: 1
|
||||
- m_ElementType: 1
|
||||
m_Unicode: 32
|
||||
m_GlyphIndex: 208
|
||||
m_Scale: 1
|
||||
- m_ElementType: 1
|
||||
m_Unicode: 66
|
||||
m_GlyphIndex: 9
|
||||
m_Scale: 1
|
||||
- m_ElementType: 1
|
||||
m_Unicode: 97
|
||||
m_GlyphIndex: 62
|
||||
m_Scale: 1
|
||||
- m_ElementType: 1
|
||||
m_Unicode: 99
|
||||
m_GlyphIndex: 71
|
||||
m_Scale: 1
|
||||
- m_ElementType: 1
|
||||
m_Unicode: 107
|
||||
m_GlyphIndex: 90
|
||||
m_Scale: 1
|
||||
- m_ElementType: 1
|
||||
m_Unicode: 78
|
||||
m_GlyphIndex: 32
|
||||
m_Scale: 1
|
||||
- m_ElementType: 1
|
||||
m_Unicode: 101
|
||||
m_GlyphIndex: 75
|
||||
m_Scale: 1
|
||||
- m_ElementType: 1
|
||||
m_Unicode: 120
|
||||
m_GlyphIndex: 119
|
||||
m_Scale: 1
|
||||
- m_ElementType: 1
|
||||
m_Unicode: 116
|
||||
m_GlyphIndex: 111
|
||||
m_Scale: 1
|
||||
m_GlyphTable: []
|
||||
m_CharacterTable: []
|
||||
m_AtlasTextures:
|
||||
- {fileID: 7223562348180106420}
|
||||
m_AtlasTextureIndex: 0
|
||||
@@ -300,100 +72,12 @@ MonoBehaviour:
|
||||
m_AtlasHeight: 1024
|
||||
m_AtlasPadding: 9
|
||||
m_AtlasRenderMode: 4165
|
||||
m_UsedGlyphRects:
|
||||
- m_X: 0
|
||||
m_Y: 0
|
||||
m_Width: 88
|
||||
m_Height: 37
|
||||
- m_X: 88
|
||||
m_Y: 0
|
||||
m_Width: 88
|
||||
m_Height: 33
|
||||
- m_X: 176
|
||||
m_Y: 0
|
||||
m_Width: 72
|
||||
m_Height: 79
|
||||
- m_X: 88
|
||||
m_Y: 33
|
||||
m_Width: 71
|
||||
m_Height: 83
|
||||
- m_X: 0
|
||||
m_Y: 37
|
||||
m_Width: 66
|
||||
m_Height: 65
|
||||
- m_X: 0
|
||||
m_Y: 102
|
||||
m_Width: 61
|
||||
m_Height: 67
|
||||
- m_X: 248
|
||||
m_Y: 0
|
||||
m_Width: 62
|
||||
m_Height: 87
|
||||
- m_X: 159
|
||||
m_Y: 79
|
||||
m_Width: 75
|
||||
m_Height: 83
|
||||
- m_X: 61
|
||||
m_Y: 116
|
||||
m_Width: 65
|
||||
m_Height: 67
|
||||
- m_X: 310
|
||||
m_Y: 0
|
||||
m_Width: 67
|
||||
m_Height: 67
|
||||
- m_X: 0
|
||||
m_Y: 169
|
||||
m_Width: 57
|
||||
m_Height: 81
|
||||
m_UsedGlyphRects: []
|
||||
m_FreeGlyphRects:
|
||||
- m_X: 159
|
||||
m_Y: 33
|
||||
m_Width: 17
|
||||
m_Height: 46
|
||||
- m_X: 234
|
||||
m_Y: 87
|
||||
m_Width: 789
|
||||
m_Height: 936
|
||||
- m_X: 234
|
||||
m_Y: 79
|
||||
m_Width: 14
|
||||
m_Height: 944
|
||||
- m_X: 66
|
||||
m_Y: 37
|
||||
m_Width: 22
|
||||
m_Height: 79
|
||||
- m_X: 61
|
||||
m_Y: 102
|
||||
m_Width: 27
|
||||
m_Height: 14
|
||||
- m_X: 126
|
||||
m_Y: 162
|
||||
m_Width: 897
|
||||
m_Height: 861
|
||||
- m_X: 126
|
||||
m_Y: 116
|
||||
m_Width: 33
|
||||
m_Height: 907
|
||||
- m_X: 310
|
||||
m_Y: 67
|
||||
m_Width: 713
|
||||
m_Height: 956
|
||||
- m_X: 377
|
||||
m_Y: 0
|
||||
m_Width: 646
|
||||
m_Height: 1023
|
||||
- m_X: 0
|
||||
m_Y: 250
|
||||
m_Y: 0
|
||||
m_Width: 1023
|
||||
m_Height: 773
|
||||
- m_X: 57
|
||||
m_Y: 183
|
||||
m_Width: 966
|
||||
m_Height: 840
|
||||
- m_X: 57
|
||||
m_Y: 169
|
||||
m_Width: 4
|
||||
m_Height: 854
|
||||
m_Height: 1023
|
||||
m_FontFeatureTable:
|
||||
m_MultipleSubstitutionRecords: []
|
||||
m_LigatureSubstitutionRecords:
|
||||
|
||||
File diff suppressed because one or more lines are too long
@@ -74,7 +74,6 @@ MonoBehaviour:
|
||||
m_MixedLightingSupported: 1
|
||||
m_SupportsLightCookies: 1
|
||||
m_SupportsLightLayers: 0
|
||||
m_DebugLevel: 0
|
||||
m_StoreActionsOptimization: 0
|
||||
m_UseAdaptivePerformance: 1
|
||||
m_ColorGradingMode: 0
|
||||
@@ -136,6 +135,7 @@ MonoBehaviour:
|
||||
m_PrefilterReflectionProbeBlending: 1
|
||||
m_PrefilterReflectionProbeBoxProjection: 1
|
||||
m_PrefilterReflectionProbeAtlas: 1
|
||||
m_PrefilterPointSamplingUpsampling: 1
|
||||
m_ShaderVariantLogLevel: 0
|
||||
m_ShadowCascades: 0
|
||||
m_Textures:
|
||||
|
||||
@@ -68,7 +68,20 @@ MonoBehaviour:
|
||||
- rid: 570818657416118287
|
||||
- rid: 570818657416118288
|
||||
m_RuntimeSettings:
|
||||
m_List: []
|
||||
m_List:
|
||||
- rid: 7752762179098771456
|
||||
- rid: 7752762179098771457
|
||||
- rid: 7752762179098771459
|
||||
- rid: 7752762179098771462
|
||||
- rid: 7752762179098771464
|
||||
- rid: 7752762179098771466
|
||||
- rid: 7752762179098771468
|
||||
- rid: 7752762179098771472
|
||||
- rid: 7752762179098771476
|
||||
- rid: 3114554777721110529
|
||||
- rid: 3114554777721110530
|
||||
- rid: 570818657416118282
|
||||
- rid: 570818657416118283
|
||||
m_AssetVersion: 10
|
||||
m_ObsoleteDefaultVolumeProfile: {fileID: 0}
|
||||
m_RenderingLayerNames:
|
||||
|
||||
@@ -977,8 +977,8 @@ RectTransform:
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
m_AnchorMin: {x: 0, y: 0}
|
||||
m_AnchorMax: {x: 1, y: 1}
|
||||
m_AnchoredPosition: {x: 149.13885, y: -50.553192}
|
||||
m_SizeDelta: {x: -336.5826, y: -178.6848}
|
||||
m_AnchoredPosition: {x: 118.53375, y: -50.553192}
|
||||
m_SizeDelta: {x: -305.9775, y: -178.6848}
|
||||
m_Pivot: {x: 0, y: 1}
|
||||
--- !u!114 &1157581244
|
||||
MonoBehaviour:
|
||||
@@ -1743,7 +1743,7 @@ MonoBehaviour:
|
||||
m_Name:
|
||||
m_EditorClassIdentifier: UnityEngine.UI::UnityEngine.UI.GridLayoutGroup
|
||||
m_Padding:
|
||||
m_Left: 0
|
||||
m_Left: 20
|
||||
m_Right: 0
|
||||
m_Top: 0
|
||||
m_Bottom: 0
|
||||
|
||||
@@ -274,8 +274,8 @@ RectTransform:
|
||||
- {fileID: 259035378}
|
||||
- {fileID: 1310839949}
|
||||
- {fileID: 376589367}
|
||||
- {fileID: 1143672390}
|
||||
- {fileID: 1340226039}
|
||||
- {fileID: 1427434780}
|
||||
m_Father: {fileID: 1950265412}
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
m_AnchorMin: {x: 0, y: 0}
|
||||
@@ -2013,16 +2013,16 @@ RectTransform:
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 1143672389}
|
||||
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
|
||||
m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
|
||||
m_LocalPosition: {x: 0, y: 0, z: 0}
|
||||
m_LocalScale: {x: 1, y: 1, z: 1}
|
||||
m_ConstrainProportionsScale: 0
|
||||
m_Children: []
|
||||
m_Father: {fileID: 153461769}
|
||||
m_Father: {fileID: 1427434780}
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
m_AnchorMin: {x: 0.5, y: 0.5}
|
||||
m_AnchorMax: {x: 0.5, y: 0.5}
|
||||
m_AnchoredPosition: {x: -139.443, y: 163.666}
|
||||
m_AnchoredPosition: {x: -83.744095, y: -9.064926}
|
||||
m_SizeDelta: {x: 2439.04, y: 1377.741}
|
||||
m_Pivot: {x: 0.5, y: 0.5}
|
||||
--- !u!222 &1143672392
|
||||
@@ -2636,6 +2636,96 @@ CanvasRenderer:
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 1351490753}
|
||||
m_CullTransparentMesh: 1
|
||||
--- !u!1 &1427434779
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
serializedVersion: 6
|
||||
m_Component:
|
||||
- component: {fileID: 1427434780}
|
||||
- component: {fileID: 1427434782}
|
||||
- component: {fileID: 1427434781}
|
||||
- component: {fileID: 1427434783}
|
||||
m_Layer: 5
|
||||
m_Name: Mask
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
--- !u!224 &1427434780
|
||||
RectTransform:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 1427434779}
|
||||
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
|
||||
m_LocalPosition: {x: 0, y: 0, z: 0}
|
||||
m_LocalScale: {x: 1, y: 1, z: 1}
|
||||
m_ConstrainProportionsScale: 0
|
||||
m_Children:
|
||||
- {fileID: 1143672390}
|
||||
m_Father: {fileID: 153461769}
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
m_AnchorMin: {x: 0, y: 0}
|
||||
m_AnchorMax: {x: 1, y: 1}
|
||||
m_AnchoredPosition: {x: -55.698975, y: 172.73102}
|
||||
m_SizeDelta: {x: -462.3999, y: -487.479}
|
||||
m_Pivot: {x: 0.5, y: 0.5}
|
||||
--- !u!114 &1427434781
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 1427434779}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: fe87c0e1cc204ed48ad3b37840f39efc, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier: UnityEngine.UI::UnityEngine.UI.Image
|
||||
m_Material: {fileID: 0}
|
||||
m_Color: {r: 1, g: 1, b: 1, a: 1}
|
||||
m_RaycastTarget: 0
|
||||
m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0}
|
||||
m_Maskable: 1
|
||||
m_OnCullStateChanged:
|
||||
m_PersistentCalls:
|
||||
m_Calls: []
|
||||
m_Sprite: {fileID: 0}
|
||||
m_Type: 0
|
||||
m_PreserveAspect: 0
|
||||
m_FillCenter: 1
|
||||
m_FillMethod: 4
|
||||
m_FillAmount: 1
|
||||
m_FillClockwise: 1
|
||||
m_FillOrigin: 0
|
||||
m_UseSpriteMesh: 0
|
||||
m_PixelsPerUnitMultiplier: 1
|
||||
--- !u!222 &1427434782
|
||||
CanvasRenderer:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 1427434779}
|
||||
m_CullTransparentMesh: 1
|
||||
--- !u!114 &1427434783
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 1427434779}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: 31a19414c41e5ae4aae2af33fee712f6, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier: UnityEngine.UI::UnityEngine.UI.Mask
|
||||
m_ShowMaskGraphic: 0
|
||||
--- !u!1 &1518670450
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
@@ -2790,6 +2880,53 @@ MonoBehaviour:
|
||||
m_Name:
|
||||
m_EditorClassIdentifier: Features.History::Darkmatter.Features.History.HistoryServiceModule
|
||||
historyButtonsView: {fileID: 1310839950}
|
||||
--- !u!1 &1794655486
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
serializedVersion: 6
|
||||
m_Component:
|
||||
- component: {fileID: 1794655488}
|
||||
- component: {fileID: 1794655487}
|
||||
m_Layer: 0
|
||||
m_Name: Coloring Pinch Zoom Controller
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
--- !u!114 &1794655487
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 1794655486}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: ddf9e0ad8b4b4ee59470410f7cf40689, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier: Features.Coloring::Darkmatter.Features.Coloring.Systems.ColoringPinchZoomController
|
||||
minZoom: 1
|
||||
maxZoom: 3
|
||||
scrollZoomSensitivity: 0.0015
|
||||
--- !u!4 &1794655488
|
||||
Transform:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 1794655486}
|
||||
serializedVersion: 2
|
||||
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
|
||||
m_LocalPosition: {x: 393.77545, y: 435.62915, z: 0}
|
||||
m_LocalScale: {x: 1, y: 1, z: 1}
|
||||
m_ConstrainProportionsScale: 0
|
||||
m_Children: []
|
||||
m_Father: {fileID: 0}
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
--- !u!1 &1867428028
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
@@ -2835,6 +2972,7 @@ MonoBehaviour:
|
||||
m_Name:
|
||||
m_EditorClassIdentifier: Features.Coloring::Darkmatter.Features.Coloring.ColoringFeatureModule
|
||||
paletteHolderView: {fileID: 1518670454}
|
||||
pinchZoomController: {fileID: 1794655487}
|
||||
--- !u!1 &1950265411
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
@@ -3897,3 +4035,4 @@ SceneRoots:
|
||||
- {fileID: 2069155641}
|
||||
- {fileID: 396806866}
|
||||
- {fileID: 1224714932}
|
||||
- {fileID: 1794655488}
|
||||
|
||||
@@ -1 +1 @@
|
||||
<?xml version="1.0" encoding="utf-8"?><resources><string name="com.crashlytics.android.build_id" translatable="false">7f32d9eb-b712-4616-ad93-07615d514802</string></resources>
|
||||
<?xml version="1.0" encoding="utf-8"?><resources><string name="com.crashlytics.android.build_id" translatable="false">8fc48ed6-41de-4dcf-a980-9aa3316fad11</string></resources>
|
||||
|
||||
@@ -1 +1 @@
|
||||
<?xml version="1.0" encoding="utf-8"?><resources><string name="com.google.firebase.crashlytics.unity_version" translatable="false">6000.4.5f1</string></resources>
|
||||
<?xml version="1.0" encoding="utf-8"?><resources><string name="com.google.firebase.crashlytics.unity_version" translatable="false">6000.5.1f1</string></resources>
|
||||
|
||||
@@ -18,12 +18,15 @@ MonoBehaviour:
|
||||
m_PlatformId: b9b35072a6f44c2e863f17467ea3dc13
|
||||
m_PlatformBuildProfile:
|
||||
rid: 570818657416118487
|
||||
m_ActivePlatformGuid:
|
||||
m_AdditionalPlatformBuildSettings: []
|
||||
m_OverrideGlobalSceneList: 0
|
||||
m_Scenes: []
|
||||
m_HasScriptingDefines: 0
|
||||
m_ScriptingDefines: []
|
||||
m_PlayerSettingsYaml:
|
||||
m_Settings: []
|
||||
requiredComponents: []
|
||||
references:
|
||||
version: 2
|
||||
RefIds:
|
||||
@@ -33,6 +36,7 @@ MonoBehaviour:
|
||||
m_Development: 0
|
||||
m_ConnectProfiler: 0
|
||||
m_BuildWithDeepProfilingSupport: 0
|
||||
m_BuildWithCodeCoverage: 0
|
||||
m_AllowDebugging: 0
|
||||
m_WaitForManagedDebugger: 0
|
||||
m_ManagedDebuggerFixedPort: 0
|
||||
|
||||
@@ -36,6 +36,15 @@ GraphicsSettings:
|
||||
- {fileID: 10783, guid: 0000000000000000f000000000000000, type: 0}
|
||||
m_PreloadedShaders: []
|
||||
m_PreloadShadersBatchTimeLimit: -1
|
||||
m_GraphicsStateCollection: {fileID: 0}
|
||||
m_CollectionStartupAction: 0
|
||||
m_TraceSavePath: TracedCollection
|
||||
m_TraceSendToEditor: 1
|
||||
m_AdditionalWarmupCollections: []
|
||||
m_WarmupAsync: 1
|
||||
m_EnableCacheMissTracing: 0
|
||||
m_WarmupProgressivelyLimit: -1
|
||||
m_CacheMissCollectionPath: CacheMissCollection
|
||||
m_SpritesDefaultMaterial: {fileID: 10754, guid: 0000000000000000f000000000000000, type: 0}
|
||||
m_CustomRenderPipeline: {fileID: 0}
|
||||
m_TransparencySortMode: 0
|
||||
@@ -61,6 +70,8 @@ GraphicsSettings:
|
||||
UnityEngine.Rendering.Universal.UniversalRenderPipeline: {fileID: 11400000, guid: 93b439a37f63240aca3dd4e01d978a9f, type: 2}
|
||||
m_ShaderBuildSettings:
|
||||
keywordDeclarationOverrides: []
|
||||
numInternalDefines: 0
|
||||
defines: []
|
||||
m_LightsUseLinearIntensity: 1
|
||||
m_LightsUseColorTemperature: 1
|
||||
m_LogWhenShaderIsCompiled: 0
|
||||
|
||||
@@ -148,7 +148,7 @@ PlayerSettings:
|
||||
loadStoreDebugModeEnabled: 0
|
||||
visionOSBundleVersion: 1.0
|
||||
tvOSBundleVersion: 1.0
|
||||
bundleVersion: 1.7
|
||||
bundleVersion: 1.9
|
||||
preloadedAssets:
|
||||
- {fileID: 11400000, guid: cc969dbecb228fa49b16da9273753a8f, type: 2}
|
||||
- {fileID: -944628639613478452, guid: 2bcd2660ca9b64942af0de543d8d7100, type: 3}
|
||||
@@ -180,7 +180,7 @@ PlayerSettings:
|
||||
iPhone: 1
|
||||
tvOS: 0
|
||||
overrideDefaultApplicationIdentifier: 1
|
||||
AndroidBundleVersionCode: 7
|
||||
AndroidBundleVersionCode: 9
|
||||
AndroidMinSdkVersion: 26
|
||||
AndroidTargetSdkVersion: 0
|
||||
AndroidPreferredInstallLocation: 1
|
||||
|
||||
Reference in New Issue
Block a user