Commit b083f3b3 authored by MernaTarek55's avatar MernaTarek55

.

parent 708f9b66
......@@ -10,18 +10,19 @@ labels:
- Ui
AudioImporter:
externalObjects: {}
serializedVersion: 6
serializedVersion: 7
defaultSettings:
serializedVersion: 2
loadType: 0
sampleRateSetting: 0
sampleRateOverride: 44100
compressionFormat: 1
quality: 1
conversionMode: 0
preloadAudioData: 0
platformSettingOverrides: {}
forceToMono: 0
normalize: 1
preloadAudioData: 1
loadInBackground: 0
ambisonic: 0
3D: 1
......
......@@ -141,9 +141,6 @@ MonoBehaviour:
cameraMotionVector: {fileID: 4800000, guid: c56b7e0d4c7cb484e959caeeedae9bbf, type: 3}
objectMotionVector: {fileID: 4800000, guid: 7b3ede40266cd49a395def176e1bc486, type: 3}
dataDrivenLensFlare: {fileID: 4800000, guid: 6cda457ac28612740adb23da5d39ea92, type: 3}
terrainDetailLitPS: {fileID: 4800000, guid: f6783ab646d374f94b199774402a5144, type: 3}
terrainDetailGrassPS: {fileID: 4800000, guid: e507fdfead5ca47e8b9a768b51c291a1, type: 3}
terrainDetailGrassBillboardPS: {fileID: 4800000, guid: 29868e73b638e48ca99a19ea58c48d90, type: 3}
m_AssetVersion: 2
m_OpaqueLayerMask:
serializedVersion: 2
......
This source diff could not be displayed because it is too large. You can view the blob instead.
This diff is collapsed.
fileFormatVersion: 2
guid: f806c66891bb0214c9a6fef2c4d49b88
PrefabImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:
using UnityEngine;
using DG.Tweening;
public class UIPanelTween : MonoBehaviour
{
public enum AnimationType
{
SlideLeft,
SlideRight,
Fade
}
[SerializeField] GameObject d;
[Header("Settings")]
public AnimationType animationType = AnimationType.SlideLeft;
public float duration = 0.5f;
public Ease ease = Ease.OutCubic;
[Header("Panel Reference")]
public RectTransform panel; // Assign any panel here
public CanvasGroup canvasGroup; // Only needed for Fade
private Vector2 startPos;
void Awake()
{
if (panel == null)
Debug.LogWarning("Panel not assigned!");
if (animationType == AnimationType.Fade && canvasGroup == null)
Debug.LogWarning("CanvasGroup needed for Fade animation!");
if (panel != null)
startPos = panel.anchoredPosition;
}
[ContextMenu("Open")]
// ================== OPEN ==================
public void Open()
{
if (panel == null) return;
panel.DOKill();
canvasGroup?.DOKill();
panel.gameObject.SetActive(true);
switch (animationType)
{
case AnimationType.SlideLeft:
panel.anchoredPosition = startPos + Vector2.left * panel.rect.width;
panel.DOAnchorPos(startPos, duration).SetEase(ease);
break;
case AnimationType.SlideRight:
panel.anchoredPosition = startPos + Vector2.right * panel.rect.width;
panel.DOAnchorPos(startPos, duration).SetEase(ease);
break;
case AnimationType.Fade:
canvasGroup.alpha = 0;
canvasGroup.DOFade(1, duration).SetEase(ease);
break;
}
}
// ================== CLOSE ==================
[ContextMenu("Close")]
public void Close()
{
if (panel == null) return;
panel.DOKill();
canvasGroup?.DOKill();
Tween t = null;
d.SetActive(true);
switch (animationType)
{
case AnimationType.SlideLeft:
t = panel.DOAnchorPos(startPos + Vector2.left * panel.rect.width, duration).SetEase(ease);
break;
case AnimationType.SlideRight:
t = panel.DOAnchorPos(startPos + Vector2.right * panel.rect.width, duration).SetEase(ease);
break;
case AnimationType.Fade:
t = canvasGroup.DOFade(0, duration).SetEase(ease);
break;
}
t.OnComplete(() => panel.gameObject.SetActive(false));
}
}
fileFormatVersion: 2
guid: 224d9104daa586047aa75f3b19baf891
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:
......@@ -135,8 +135,8 @@ Material:
- _XRMotionVectorsPass: 1
- _ZWrite: 0
m_Colors:
- _BaseColor: {r: 0, g: 1, b: 0.10825572, a: 0.6466718}
- _Color: {r: 0, g: 1, b: 0.10828138, a: 0.9245481}
- _BaseColor: {r: 0, g: 1, b: 0.10825535, a: 0.07928683}
- _Color: {r: 0, g: 1, b: 0.10825569, a: 0.6466718}
- _EmissionColor: {r: 0, g: 0, b: 0, a: 1}
- _SpecColor: {r: 0.19999996, g: 0.19999996, b: 0.19999996, a: 1}
m_BuildTextureStacks: []
fileFormatVersion: 2
guid: 6af79ceb3f917704e9feabe4e0e92ca9
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:
This diff is collapsed.
fileFormatVersion: 2
guid: 5fa264385f0cc9544b4dc1bd1e33f578
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:
This diff is collapsed.
......@@ -6,14 +6,14 @@
Shader "TextMeshPro/Mobile/Distance Field" {
Properties {
[HDR]_FaceColor ("Face Color", Color) = (1,1,1,1)
_FaceColor ("Face Color", Color) = (1,1,1,1)
_FaceDilate ("Face Dilate", Range(-1,1)) = 0
[HDR]_OutlineColor ("Outline Color", Color) = (0,0,0,1)
_OutlineColor ("Outline Color", Color) = (0,0,0,1)
_OutlineWidth ("Outline Thickness", Range(0,1)) = 0
_OutlineSoftness ("Outline Softness", Range(0,1)) = 0
[HDR]_UnderlayColor ("Border Color", Color) = (0,0,0,.5)
_UnderlayColor ("Border Color", Color) = (0,0,0,.5)
_UnderlayOffsetX ("Border OffsetX", Range(-1,1)) = 0
_UnderlayOffsetY ("Border OffsetY", Range(-1,1)) = 0
_UnderlayDilate ("Border Dilate", Range(-1,1)) = 0
......@@ -81,6 +81,7 @@ SubShader {
Pass {
CGPROGRAM
#pragma enable_d3d11_debug_symbols
#pragma vertex VertShader
#pragma fragment PixShader
#pragma shader_feature __ OUTLINE_ON
......@@ -98,7 +99,7 @@ SubShader {
float4 vertex : POSITION;
float3 normal : NORMAL;
fixed4 color : COLOR;
float2 texcoord0 : TEXCOORD0;
float4 texcoord0 : TEXCOORD0;
float2 texcoord1 : TEXCOORD1;
};
......@@ -117,6 +118,9 @@ SubShader {
#endif
};
float _UIMaskSoftnessX;
float _UIMaskSoftnessY;
int _UIVertexColorAlwaysGammaSpace;
pixel_t VertShader(vertex_t input)
{
......@@ -127,7 +131,7 @@ SubShader {
UNITY_TRANSFER_INSTANCE_ID(input, output);
UNITY_INITIALIZE_VERTEX_OUTPUT_STEREO(output);
float bold = step(input.texcoord1.y, 0);
float bold = step(input.texcoord0.w, 0);
float4 vert = input.vertex;
vert.x += _VertexOffsetX;
......@@ -138,7 +142,7 @@ SubShader {
pixelSize /= float2(_ScaleX, _ScaleY) * abs(mul((float2x2)UNITY_MATRIX_P, _ScreenParams.xy));
float scale = rsqrt(dot(pixelSize, pixelSize));
scale *= abs(input.texcoord1.y) * _GradientScale * (_Sharpness + 1);
scale *= abs(input.texcoord0.w) * _GradientScale * (_Sharpness + 1);
if(UNITY_MATRIX_P[3][3] == 0) scale = lerp(abs(scale) * (1 - _PerspectiveFilter), scale, abs(dot(UnityObjectToWorldNormal(input.normal.xyz), normalize(WorldSpaceViewDir(vert)))));
float weight = lerp(_WeightNormal, _WeightBold, bold) / 4.0;
......@@ -150,6 +154,10 @@ SubShader {
float bias = (0.5 - weight) * scale - 0.5;
float outline = _OutlineWidth * _ScaleRatioA * 0.5 * scale;
if (_UIVertexColorAlwaysGammaSpace && !IsGammaSpace())
{
input.color.rgb = UIGammaToLinear(input.color.rgb);
}
float opacity = input.color.a;
#if (UNDERLAY_ON | UNDERLAY_INNER)
opacity = 1.0;
......@@ -182,7 +190,9 @@ SubShader {
output.outlineColor = outlineColor;
output.texcoord0 = float4(input.texcoord0.x, input.texcoord0.y, maskUV.x, maskUV.y);
output.param = half4(scale, bias - outline, bias + outline, bias);
output.mask = half4(vert.xy * 2 - clampedRect.xy - clampedRect.zw, 0.25 / (0.25 * half2(_MaskSoftnessX, _MaskSoftnessY) + pixelSize.xy));
const half2 maskSoftness = half2(max(_UIMaskSoftnessX, _MaskSoftnessX), max(_UIMaskSoftnessY, _MaskSoftnessY));
output.mask = half4(vert.xy * 2 - clampedRect.xy - clampedRect.zw, 0.25 / (0.25 * maskSoftness + pixelSize.xy));
#if (UNDERLAY_ON || UNDERLAY_INNER)
output.texcoord1 = float4(input.texcoord0 + layerOffset, input.color.a, 0);
output.underlayParam = half2(layerScale, layerBias);
......
......@@ -66,11 +66,6 @@ uniform float _MaskID;
uniform sampler2D _MaskTex;
uniform float4 _MaskCoord;
uniform float4 _ClipRect; // bottom left(x,y) : top right(z,w)
//uniform float _MaskWipeControl;
//uniform float _MaskEdgeSoftness;
//uniform fixed4 _MaskEdgeColor;
//uniform bool _MaskInverse;
uniform float _MaskSoftnessX;
uniform float _MaskSoftnessY;
......
fileFormatVersion: 2
guid: e03263ec499119e44aa24d49ae8f6001
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.Video;
public class UrlVideoPlayer : MonoBehaviour
{
[SerializeField] VideoPlayer videoPlayer;
[SerializeField] string videoName;
void Start()
{
videoPlayer.url = Application.streamingAssetsPath + "/" + videoName;
}
}
fileFormatVersion: 2
guid: 0c985d82bacff184cac4949e38a1422b
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:
fileFormatVersion: 2
guid: 54d6e12507fb2394899b7d4497eea565
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!84 &8400000
RenderTexture:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_Name: car
m_ImageContentsHash:
serializedVersion: 2
Hash: 00000000000000000000000000000000
m_ForcedFallbackFormat: 4
m_DownscaleFallback: 0
m_IsAlphaChannelOptional: 0
serializedVersion: 5
m_Width: 500
m_Height: 300
m_AntiAliasing: 1
m_MipCount: -1
m_DepthStencilFormat: 94
m_ColorFormat: 8
m_MipMap: 0
m_GenerateMips: 1
m_SRGB: 0
m_UseDynamicScale: 0
m_BindMS: 0
m_EnableCompatibleFormat: 1
m_EnableRandomWrite: 0
m_TextureSettings:
serializedVersion: 2
m_FilterMode: 1
m_Aniso: 0
m_MipBias: 0
m_WrapU: 1
m_WrapV: 1
m_WrapW: 1
m_Dimension: 2
m_VolumeDepth: 1
m_ShadowSamplingMode: 2
fileFormatVersion: 2
guid: 4aec54c7ca49e6f4da2b9852936be09f
NativeFormatImporter:
externalObjects: {}
mainObjectFileID: 8400000
userData:
assetBundleName:
assetBundleVariant:
fileFormatVersion: 2
guid: e6afd50a84c0eec429b3d2512ab4321e
TextureImporter:
internalIDToNameTable: []
externalObjects: {}
serializedVersion: 13
mipmaps:
mipMapMode: 0
enableMipMap: 1
sRGBTexture: 1
linearTexture: 0
fadeOut: 0
borderMipMap: 0
mipMapsPreserveCoverage: 0
alphaTestReferenceValue: 0.5
mipMapFadeDistanceStart: 1
mipMapFadeDistanceEnd: 3
bumpmap:
convertToNormalMap: 0
externalNormalMap: 0
heightScale: 0.25
normalMapFilter: 0
flipGreenChannel: 0
isReadable: 0
streamingMipmaps: 0
streamingMipmapsPriority: 0
vTOnly: 0
ignoreMipmapLimit: 0
grayScaleToAlpha: 0
generateCubemap: 6
cubemapConvolution: 0
seamlessCubemap: 0
textureFormat: 1
maxTextureSize: 2048
textureSettings:
serializedVersion: 2
filterMode: 1
aniso: 1
mipBias: 0
wrapU: 0
wrapV: 0
wrapW: 0
nPOTScale: 1
lightmap: 0
compressionQuality: 50
spriteMode: 0
spriteExtrude: 1
spriteMeshType: 1
alignment: 0
spritePivot: {x: 0.5, y: 0.5}
spritePixelsToUnits: 100
spriteBorder: {x: 0, y: 0, z: 0, w: 0}
spriteGenerateFallbackPhysicsShape: 1
alphaUsage: 1
alphaIsTransparency: 0
spriteTessellationDetail: -1
textureType: 0
textureShape: 1
singleChannelComponent: 0
flipbookRows: 1
flipbookColumns: 1
maxTextureSizeSet: 0
compressionQualitySet: 0
textureFormatSet: 0
ignorePngGamma: 0
applyGammaDecoding: 0
swizzle: 50462976
cookieLightType: 0
platformSettings:
- serializedVersion: 3
buildTarget: DefaultTexturePlatform
maxTextureSize: 2048
resizeAlgorithm: 0
textureFormat: -1
textureCompression: 1
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
ignorePlatformSupport: 0
androidETC2FallbackOverride: 0
forceMaximumCompressionQuality_BC6H_BC7: 0
- serializedVersion: 3
buildTarget: Standalone
maxTextureSize: 2048
resizeAlgorithm: 0
textureFormat: -1
textureCompression: 1
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
ignorePlatformSupport: 0
androidETC2FallbackOverride: 0
forceMaximumCompressionQuality_BC6H_BC7: 0
- serializedVersion: 3
buildTarget: WebGL
maxTextureSize: 2048
resizeAlgorithm: 0
textureFormat: -1
textureCompression: 1
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
ignorePlatformSupport: 0
androidETC2FallbackOverride: 0
forceMaximumCompressionQuality_BC6H_BC7: 0
- serializedVersion: 3
buildTarget: Windows Store Apps
maxTextureSize: 2048
resizeAlgorithm: 0
textureFormat: -1
textureCompression: 1
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
ignorePlatformSupport: 0
androidETC2FallbackOverride: 0
forceMaximumCompressionQuality_BC6H_BC7: 0
spriteSheet:
serializedVersion: 2
sprites: []
outline: []
physicsShape: []
bones: []
spriteID:
internalID: 0
vertices: []
indices:
edges: []
weights: []
secondaryTextures: []
nameFileIdTable: {}
mipmapLimitGroupName:
pSDRemoveMatte: 0
userData:
assetBundleName:
assetBundleVariant:
......@@ -21,12 +21,11 @@
"dependencies": {}
},
"com.unity.burst": {
"version": "1.8.21",
"version": "1.8.9",
"depth": 1,
"source": "registry",
"dependencies": {
"com.unity.mathematics": "1.2.1",
"com.unity.modules.jsonserialize": "1.0.0"
"com.unity.mathematics": "1.2.1"
},
"url": "https://packages.unity.com"
},
......@@ -56,13 +55,13 @@
"depth": 0,
"source": "builtin",
"dependencies": {
"com.unity.ide.visualstudio": "2.0.22",
"com.unity.ide.rider": "3.0.36",
"com.unity.ide.visualstudio": "2.0.21",
"com.unity.ide.rider": "3.0.25",
"com.unity.ide.vscode": "1.2.5",
"com.unity.editorcoroutines": "1.0.0",
"com.unity.performance.profile-analyzer": "1.2.3",
"com.unity.performance.profile-analyzer": "1.2.2",
"com.unity.test-framework": "1.1.33",
"com.unity.testtools.codecoverage": "1.2.6"
"com.unity.testtools.codecoverage": "1.2.4"
}
},
"com.unity.formats.fbx": {
......@@ -76,7 +75,7 @@
"url": "https://packages.unity.com"
},
"com.unity.ide.rider": {
"version": "3.0.36",
"version": "3.0.25",
"depth": 1,
"source": "registry",
"dependencies": {
......@@ -85,7 +84,7 @@
"url": "https://packages.unity.com"
},
"com.unity.ide.visualstudio": {
"version": "2.0.22",
"version": "2.0.21",
"depth": 1,
"source": "registry",
"dependencies": {
......@@ -108,14 +107,14 @@
"url": "https://packages.unity.com"
},
"com.unity.performance.profile-analyzer": {
"version": "1.2.3",
"version": "1.2.2",
"depth": 1,
"source": "registry",
"dependencies": {},
"url": "https://packages.unity.com"
},
"com.unity.render-pipelines.core": {
"version": "14.0.12",
"version": "14.0.9",
"depth": 1,
"source": "builtin",
"dependencies": {
......@@ -132,17 +131,8 @@
"dependencies": {
"com.unity.mathematics": "1.2.1",
"com.unity.burst": "1.8.9",
"com.unity.render-pipelines.core": "14.0.12",
"com.unity.shadergraph": "14.0.12",
"com.unity.render-pipelines.universal-config": "14.0.9"
}
},
"com.unity.render-pipelines.universal-config": {
"version": "14.0.10",
"depth": 1,
"source": "builtin",
"dependencies": {
"com.unity.render-pipelines.core": "14.0.10"
"com.unity.render-pipelines.core": "14.0.9",
"com.unity.shadergraph": "14.0.9"
}
},
"com.unity.searcher": {
......@@ -153,18 +143,18 @@
"url": "https://packages.unity.com"
},
"com.unity.settings-manager": {
"version": "2.1.0",
"version": "2.0.1",
"depth": 2,
"source": "registry",
"dependencies": {},
"url": "https://packages.unity.com"
},
"com.unity.shadergraph": {
"version": "14.0.12",
"version": "14.0.9",
"depth": 1,
"source": "builtin",
"dependencies": {
"com.unity.render-pipelines.core": "14.0.12",
"com.unity.render-pipelines.core": "14.0.9",
"com.unity.searcher": "4.9.2"
}
},
......@@ -180,7 +170,7 @@
"url": "https://packages.unity.com"
},
"com.unity.testtools.codecoverage": {
"version": "1.2.6",
"version": "1.2.4",
"depth": 1,
"source": "registry",
"dependencies": {
......
m_EditorVersion: 2022.3.62f1
m_EditorVersionWithRevision: 2022.3.62f1 (4af31df58517)
m_EditorVersion: 2022.3.12f1
m_EditorVersionWithRevision: 2022.3.12f1 (4fe6e059c7ef)
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment