Commit 13d81c32 authored by Yousef Sameh's avatar Yousef Sameh

Merge remote-tracking branch 'origin/pt_supabase_authentication' into NewUI

# Conflicts:
#	My project/Assets/AppUI/Scripts/LoginPageAnimation.cs
#	My project/Assets/UniversalRenderPipelineGlobalSettings.asset
#	My project/Packages/packages-lock.json
#	My project/ProjectSettings/ProjectVersion.txt
#	My project/UserSettings/EditorUserSettings.asset
#	My project/UserSettings/Layouts/CurrentMaximizeLayout.dwlt
#	My project/UserSettings/Layouts/default-6000.dwlt
parents f402435f e97f5ca0
using System.Xml.Schema;
public static class AppUtils
{
public static string RankToArabic(string rank)
{
return rank switch
return rank.ToLower() switch
{
"Normal" => "مبتدأ",
"Geek" => "هاوي",
"Master" => "محترف",
"Olympian" => "اسطوري",
"normal" => "مبتدأ",
"geek" => "هاوي",
"master" => "محترف",
"olympian" => "اسطوري",
_ => rank
};
}
}
public struct Rank
{
public string Name;
public int StartXP;
public int EndXP;
public Rank(string name, int startXP, int endXP)
{
Name = name;
StartXP = startXP;
EndXP = endXP;
}
public string ArabicName => Name.ToLower() switch
{
"normal" => "مبتدأ",
"geek" => "هاوي",
"master" => "محترف",
"olympian" => "اسطوري",
_ => Name
};
public bool Contains(int xp) => xp >= StartXP && xp <= EndXP;
public float Progress(int xp)
{
if (EndXP == StartXP) return 1f;
return (float)(xp - StartXP) / (EndXP - StartXP);
}
public bool IsMaxRank => this.Equals(Olympian);
public Rank? Next
{
get
{
for (int i = 0; i < All.Length - 1; i++)
{
if (All[i].Name == Name)
return All[i + 1];
}
return null;
}
}
public Rank? Previous
{
get
{
for (int i = 1; i < All.Length; i++)
{
if (All[i].Name == Name)
return All[i - 1];
}
return null;
}
}
public int XPToNextRank(int currentXP)
{
var next = Next;
if (next == null) return 0;
return next.Value.StartXP - currentXP;
}
public static readonly Rank Normal = new("Normal", 0, 999);
public static readonly Rank Geek = new("Geek", 1000, 2499);
public static readonly Rank Master = new("Master", 2500, 3999);
public static readonly Rank Olympian = new("Olympian", 4000, int.MaxValue);
public static readonly Rank[] All = { Normal, Geek, Master, Olympian };
public static Rank FromXP(int xp)
{
for (int i = All.Length - 1; i >= 0; i--)
{
if (xp >= All[i].StartXP)
return All[i];
}
return Normal;
}
public static Rank FromName(string name)
{
foreach (var rank in All)
{
if (rank.Name.ToLower() == name.ToLower())
return rank;
}
return Normal;
}
}
\ No newline at end of file
using UnityEngine;
public class Splash : MonoBehaviour
{
}
fileFormatVersion: 2
guid: c7f3fdf6e62442c5485a9ff394896b54
\ No newline at end of file
guid: 78c293a646596184bb35371f972aef61
\ No newline at end of file
......@@ -18,12 +18,18 @@ public class SupabaseAuthentication : MonoBehaviour
supabaseManager = SupabaseManager.Instance;
}
public async UniTask<OneOf<Success, string>> LogIn(string username, string password)
public async UniTask<OneOf<Success, string>> EnsureSession()
{
try
{
IsLoading = true;
await supabaseManager.Supabase()!.Auth.SignIn(username, password);
supabaseManager.Supabase()!.Auth.LoadSession();
if (supabaseManager.Supabase()!.Auth.CurrentUser == null)
{
await supabaseManager.Supabase()!.Auth.SignInAnonymously();
}
return new Success();
}
catch (GotrueException gotrueexception)
......@@ -34,43 +40,87 @@ public class SupabaseAuthentication : MonoBehaviour
{
return e.Message;
}
finally
{
IsLoading = false;
}
}
public async UniTask<OneOf<Success, string>> SignUp(string email, string password, string displayName, string fullName)
public async UniTask<OneOf<Success, string>> SignInAnonymously()
{
try
{
IsLoading = true;
await supabaseManager.Supabase()!.Auth.SignUp(email, password);
var userProfile = await UserService.Instance.CreateUserProfile(displayName, fullName, email);
userProfile.Switch((_) => { }, (error) =>
{
Debug.LogError(error);
});
await supabaseManager.Supabase()!.Auth.SignInAnonymously();
return new Success();
}
catch (GotrueException gotrueexception)
{
return gotrueexception.Message;
}
catch (Exception e)
{
return e.Message;
}
finally
{
IsLoading = false;
}
}
public async UniTask<OneOf<Success, string>> LogIn(string username, string password)
{
try
{
IsLoading = true;
await supabaseManager.Supabase()!.Auth.SignIn(username, password);
return new Success();
}
catch (GotrueException gotrueexception)
{
return gotrueexception.Message;
}
catch (Exception e)
{
return e.Message;
}
finally
{
IsLoading = false;
}
}
// public async UniTask<OneOf<Success, string>> SignUp(string email, string password, string displayName, string fullName)
// {
// try
// {
// IsLoading = true;
// await supabaseManager.Supabase()!.Auth.SignUp(email, password);
// var userProfile = await UserService.Instance.CreateUserProfile(displayName, fullName, email);
// userProfile.Switch((_) => { }, (error) =>
// {
// Debug.LogError(error);
// });
// return new Success();
// }
// catch (GotrueException gotrueexception)
// {
// IsLoading = false;
// return gotrueexception.Message;
// }
// catch (Exception e)
// {
// return e.Message;
// }
// finally
// {
// IsLoading = false;
// }
// }
// UI button
public void LogOutButton()
{
......
fileFormatVersion: 2
guid: fd49566d83fe00b48a6f6c1ad1d872e3
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:
using System;
using Supabase.Postgrest.Attributes;
using Supabase.Postgrest.Models;
[Table("challenges")]
public class Challenge : BaseModel
{
[PrimaryKey("id")]
public string Id { get; set; }
[Column("user_id")]
public string UserId { get; set; }
[Column("has_won")]
public bool HasWon { get; set; }
[Column("points_earned")]
public int PointsEarned { get; set; } = 0;
[Column("started_at")]
public DateTime StartedAt { get; set; }
[Column("ended_at")]
public DateTime EndedAt { get; set; }
[Column("created_at")]
public DateTime CreatedAt { get; set; }
}
\ No newline at end of file
fileFormatVersion: 2
guid: 90f958872b71bed449582ff3552a4ab5
\ No newline at end of file
using Cysharp.Threading.Tasks;
using OneOf;
using Supabase;
using System;
using System.Collections.Generic;
using UnityEngine;
using static Supabase.Postgrest.Constants;
public class ChallengeService : Singleton<ChallengeService>
{
private Client supabase => SupabaseManager.Instance.Supabase();
// Add a completed challenge
public async UniTask<OneOf<ChallengeResult, ErrorResult>> AddChallenge(
bool hasWon,
int points,
DateTime startTime,
DateTime endTime)
{
try
{
var authUser = supabase.Auth.CurrentUser;
if (authUser == null)
return new ErrorResult("Not authenticated");
var challenge = new Challenge
{
HasWon = hasWon,
PointsEarned = points,
StartedAt = startTime,
EndedAt = endTime,
CreatedAt = DateTime.UtcNow
};
await supabase.From<Challenge>().Insert(challenge);
Debug.Log($"✓ Challenge added: {(hasWon ? "Won" : "Lost")} - {points} pts");
return new ChallengeResult(challenge);
}
catch (Exception ex)
{
Debug.LogError($"Error adding challenge: {ex.Message}");
return new ErrorResult(ex.Message);
}
}
// Get user's challenge history
public async UniTask<OneOf<ChallengeListResult, ErrorResult>> GetUserChallenges(int limit = 50)
{
try
{
var authUser = supabase.Auth.CurrentUser;
if (authUser == null)
return new ErrorResult("Not authenticated");
var userId = authUser.Id.ToString();
var response = await supabase
.From<Challenge>()
.Where(x => x.UserId == userId)
.Order(x => x.StartedAt, Ordering.Descending)
.Limit(limit)
.Get();
return new ChallengeListResult(response.Models ?? new());
}
catch (Exception ex)
{
return new ErrorResult(ex.Message);
}
}
// Get challenge by ID
public async UniTask<OneOf<ChallengeResult, ErrorResult>> GetChallengeById(string challengeId)
{
try
{
var response = await supabase
.From<Challenge>()
.Where(x => x.Id == challengeId)
.Get();
if (response?.Models == null || response.Models.Count == 0)
return new ErrorResult("Challenge not found");
return new ChallengeResult(response.Models[0]);
}
catch (Exception ex)
{
return new ErrorResult(ex.Message);
}
}
// Get win/loss stats
public async UniTask<OneOf<ChallengeStatsResult, ErrorResult>> GetChallengeStats()
{
try
{
var authUser = supabase.Auth.CurrentUser;
if (authUser == null)
return new ErrorResult("Not authenticated");
var userId = authUser.Id.ToString();
var response = await supabase
.From<Challenge>()
.Where(x => x.UserId == userId)
.Get();
var challenges = response.Models ?? new();
int totalGames = challenges.Count;
int wins = 0;
int losses = 0;
int totalPoints = 0;
foreach (var c in challenges)
{
if (c.HasWon) wins++;
else losses++;
totalPoints += c.PointsEarned;
}
float winRate = totalGames > 0 ? (float)wins / totalGames * 100f : 0f;
return new ChallengeStatsResult(
TotalGames: totalGames,
Wins: wins,
Losses: losses,
WinRate: winRate,
TotalPoints: totalPoints
);
}
catch (Exception ex)
{
return new ErrorResult(ex.Message);
}
}
}
// Result types
public record ChallengeResult(Challenge Challenge);
public record ChallengeListResult(List<Challenge> Challenges);
public record ChallengeStatsResult(
int TotalGames,
int Wins,
int Losses,
float WinRate,
int TotalPoints
);
\ No newline at end of file
fileFormatVersion: 2
guid: 02f567249bc7e8949a0ce010a6f7a353
\ No newline at end of file
using Cysharp.Threading.Tasks;
using Supabase.Gotrue;
using Supabase.Gotrue.Interfaces;
using UnityEngine;
using UnityEngine.Events;
using UnityEngine.SceneManagement;
public class SessionListener : Singleton<SessionListener>
{
[SerializeField] private SupabaseManager SupabaseManager;
[SerializeField] private Transform splash;
[SerializeField] private UnityEvent LoggedIn;
[SerializeField] private UnityEvent LoggedOut;
[SerializeField] private UnityEvent NewUser;
public async UniTask HandleSession()
{
var session = await SupabaseAuthentication.Instance.EnsureSession();
session.Switch(async s =>
{
var foundUser = await UserFileFoundAndLoaded();
if (foundUser)
{
LoggedIn.Invoke();
}
else
{
UserService.Instance.OnUserChange += OnUserChanged;
splash.gameObject.SetActive(false);
NewUser.Invoke();
}
},
(error) =>
{
Debug.LogError(error);
});
}
public void UnityAuthListener(IGotrueClient<Supabase.Gotrue.User, Session> sender, Constants.AuthState newState)
{
switch (newState)
{
case Constants.AuthState.SignedIn:
LoggedIn.Invoke();
break;
case Constants.AuthState.SignedOut:
LoggedOut.Invoke();
break;
case Constants.AuthState.UserUpdated:
LoggedIn.Invoke();
break;
case Constants.AuthState.PasswordRecovery:
Debug.Log("Password Recovery");
break;
case Constants.AuthState.TokenRefreshed:
Debug.Log("Token Refreshed");
break;
case Constants.AuthState.Shutdown:
Debug.Log("Shutdown");
......@@ -37,4 +63,18 @@ public class SessionListener : Singleton<SessionListener>
break;
}
}
private void OnUserChanged(User user)
{
if (SceneManager.GetActiveScene().name != "MainMenu")
{
LoggedIn.Invoke();
}
}
private async UniTask<bool> UserFileFoundAndLoaded()
{
var userOrError = await UserService.Instance.LoadCurrentUser();
return userOrError.IsT0;
}
}
using System;
using Cysharp.Threading.Tasks;
using Supabase;
using Supabase.Gotrue;
using UnityEngine;
......@@ -39,11 +40,15 @@ public class SupabaseManager : Singleton<SupabaseManager>
// This will be called whenever the session changes
client.Auth.AddStateChangedListener(SessionListener.UnityAuthListener);
SessionListener.HandleSession().Forget();
// Fetch the session from the persistence layer
// If there is a valid/unexpired session available this counts as a user log in
// and will send an event to the UnityAuthListener above.
client.Auth.LoadSession();
// client.Auth.LoadSession();
// await SupabaseAuthentication.Instance.EnsureSession();
// Allow unconfirmed user sessions. If you turn this on you will have to complete the
// email verification flow before you can use the session.
......
......@@ -9,9 +9,9 @@ public class LeaderboardPlayerModel : BaseModel
[JsonProperty("id")]
public string Id { get; set; }
[Column("display_name")]
[JsonProperty("display_name")]
public string DisplayName { get; set; }
[Column("user_name")]
[JsonProperty("user_name")]
public string UserName { get; set; }
[Column("avatar_url")]
[JsonProperty("avatar_url")]
......
......@@ -14,18 +14,19 @@ public class UserService : Singleton<UserService>
private RealtimeChannel _userChannel;
public async UniTask LoadCurrentUser()
public async UniTask<OneOf<UserResult, ErrorResult>> LoadCurrentUser()
{
var userOrFail = await GetCurrentUser();
userOrFail.Switch(async (user) =>
{
CurrentUser = user.User;
OnUserChange?.Invoke(CurrentUser);
await SubscribeToCurrentUserChanges(CurrentUser.Id);
await SubscribeToCurrentUserChanges();
}, (error) =>
{
Debug.LogError(error.Message);
});
return userOrFail;
}
protected async override void Awake()
......@@ -33,20 +34,24 @@ public class UserService : Singleton<UserService>
base.Awake();
}
public async UniTask<OneOf<UserResult, ErrorResult>> CreateUserProfile(
string displayName,
string fullname,
string email,
string? avatarUrl = null)
string username,
string grade,
string school,
string sex,
string age
)
{
try
{
var user = new User
{
DisplayName = displayName,
AvatarUrl = avatarUrl,
FullName = fullname,
Email = email,
Username = username,
Grade = grade,
School = school,
Sex = sex,
Age = age,
Rank = "normal",
Points = 0,
CreatedAt = DateTime.UtcNow,
......@@ -109,24 +114,30 @@ public class UserService : Singleton<UserService>
}
}
private async UniTask SubscribeToCurrentUserChanges(string userId)
public async UniTask SubscribeToCurrentUserChanges()
{
var userId = supabase.Auth.CurrentUser?.Id;
if (string.IsNullOrWhiteSpace(userId))
{
Debug.LogError("User ID is null or empty. Cannot subscribe to user changes.");
return;
}
if (_userChannel != null)
{
_userChannel.Unsubscribe();
_userChannel = null;
}
await supabase.Realtime.ConnectAsync();
_userChannel = supabase.Realtime.Channel($"user_{userId}");
_userChannel.Register(new PostgresChangesOptions(schema: "public", table: "users", eventType: PostgresChangesOptions.ListenType.Updates, filter: $"id=eq.{userId}"));
_userChannel.Register(new PostgresChangesOptions(schema: "public", table: "users", eventType: PostgresChangesOptions.ListenType.All, filter: $"id=eq.{userId}"));
_userChannel.AddPostgresChangeHandler(
PostgresChangesOptions.ListenType.Updates,
PostgresChangesOptions.ListenType.All,
(_, change) =>
{
var updatedUser = change.Model<User>();
......@@ -160,7 +171,7 @@ public class UserService : Singleton<UserService>
await supabase
.From<User>()
.Where(x => x.Id == authUser.Id.ToString())
.Update(new User { DisplayName = newDisplayName });
.Update(new User { Username = newDisplayName });
return await GetCurrentUser();
}
......@@ -170,26 +181,6 @@ public class UserService : Singleton<UserService>
}
}
public async UniTask<OneOf<UserResult, ErrorResult>> UpdateAvatar(string avatarUrl)
{
try
{
var authUser = supabase.Auth.CurrentUser;
if (authUser == null)
return new ErrorResult("Not authenticated");
await supabase
.From<User>()
.Where(x => x.Id == authUser.Id.ToString())
.Update(new User { AvatarUrl = avatarUrl });
return await GetCurrentUser();
}
catch (Exception ex)
{
return new ErrorResult(ex.Message);
}
}
public async UniTask<OneOf<UserResult, ErrorResult>> DeleteCurrentUser()
{
......
......@@ -12,21 +12,9 @@ public class User : BaseModel
[JsonProperty("id")]
public string Id { get; set; }
[Column("display_name")]
[JsonProperty("display_name")]
public string DisplayName { get; set; }
[Column("full_name")]
[JsonProperty("full_name")]
public string FullName { get; set; }
[Column("email")]
[JsonProperty("email")]
public string Email { get; set; }
[Column("avatar_url")]
[JsonProperty("avatar_url")]
public string? AvatarUrl { get; set; }
[Column("user_name")]
[JsonProperty("user_name")]
public string Username { get; set; }
[Column("rank")]
[JsonProperty("rank")]
......@@ -43,5 +31,21 @@ public class User : BaseModel
[Column("updated_at")]
[JsonProperty("updated_at")]
public DateTime UpdatedAt { get; set; }
[Column("school")]
[JsonProperty("school")]
public string School { get; set; }
[Column("grade")]
[JsonProperty("grade")]
public string Grade { get; set; }
[Column("sex")]
[JsonProperty("sex")]
public string Sex { get; set; }
[Column("age")]
[JsonProperty("age")]
public string Age { get; set; }
}
......@@ -7,16 +7,20 @@ using UnityEngine.UIElements;
public class HomeController : MonoBehaviour
{
[SerializeField] private UIDocument mainMenuDocument;
[SerializeField] private GameObject challengePrefab;
private Label name;
private Label username;
private Label xp;
private Label rank;
private Label xpRankEnd;
private CustomProgressBar nextRankProgressBar;
private Button challengeButton;
private Label nameMenuPanel;
private Label xpMenuPanel;
private Label rankMenuPanel;
private CustomProgressBar xpProgressBar;
private ScrollView activityScrollView;
private Button logoutButton;
......@@ -28,107 +32,64 @@ public class HomeController : MonoBehaviour
var root = mainMenuDocument.rootVisualElement.Q("Home");
menuPanel = mainMenuDocument.rootVisualElement.Q("MenuPanel");
name = root.Q<Label>("Name");
username = root.Q<Label>("Username");
rank = root.Q<Label>("Rank");
xp = root.Q<Label>("Xp");
nameMenuPanel = menuPanel.Q<Label>("Name");
rankMenuPanel = menuPanel.Q<Label>("Rank");
xpMenuPanel = menuPanel.Q<Label>("Xp");
logoutButton = mainMenuDocument.rootVisualElement.Q<Button>("Logout");
xpProgressBar = root.Q<CustomProgressBar>("ProgressBar");
activityScrollView = mainMenuDocument.rootVisualElement.Q("LiveBar").Children().First() as ScrollView;
logoutButton.clicked += () =>
{
SupabaseAuthentication.Instance.LogOut();
};
xp = root.Q<Label>("XP");
xpRankEnd = root.Q<Label>("XPRankEnd");
nextRankProgressBar = root.Q<CustomProgressBar>("NextRankProgressBar");
UserService.Instance.OnUserChange += OnUserChange;
ActivityService.Instance.OnNewActivityReceived += OnNewActivityReceived;
}
private async void Start()
{
OnUserChange(UserService.Instance.CurrentUser);
ActivityService.Instance.Initialize();
var activiesOrError = await ActivityService.Instance.LoadLatest3Activies();
activiesOrError.Switch(activities =>
{
var reversedActivities = activities.AsEnumerable().Reverse();
foreach (var activity in reversedActivities)
{
var Label = new Label($"<color=#FED700>{activity.Message.Split(" ")[0]}</color> {activity.Message.Split(" ")[1..].Aggregate((a, b) => a + " " + b)}");
activityScrollView.Add(Label);
}
}, error =>
{
Debug.LogError($"Failed to load activities: {error}");
});
FakeActivity();
}
public async UniTask FakeActivity()
{
while (true)
{
await UniTask.Delay(2000);
var ran = Random.Range(0, 100);
print($"Fake Activity: حصلت على {ran} نقطة خبرة!");
OnNewActivityReceived(new Activity { Message = $"لقد حصلت على {ran} نقطة خبرة!" });
}
}
public void show()
{
gameObject.SetActive(true);
}
public void hide()
{
gameObject.SetActive(false);
challengeButton = root.Q<Button>("Challenge");
challengeButton.clicked += OnChallengeButtonClicked;
}
private void OnUserChange(User user)
{
name.text = user.DisplayName;
username.text = user.Username;
xp.text = user.Points.ToString();
rank.text = AppUtils.RankToArabic(user.Rank);
xpRankEnd.text = $"{user.Points} / {Rank.FromXP(user.Points).EndXP}";
nameMenuPanel.text = user.DisplayName;
xpMenuPanel.text = user.Points.ToString();
rankMenuPanel.text = AppUtils.RankToArabic(user.Rank);
xpProgressBar.Value = user.Points / 5000f;
nextRankProgressBar.Value = Rank.FromXP(user.Points).Progress(user.Points);
nextRankProgressBar.LeftText = Rank.FromXP(user.Points).StartXP.ToString() + " " + Rank.FromXP(user.Points).ArabicName;
nextRankProgressBar.RightText = Rank.FromXP(user.Points).Next?.StartXP.ToString() + " " + Rank.FromXP(user.Points).Next?.ArabicName;
}
private void OnNewActivityReceived(Activity activity)
// private void OnNewActivityReceived(Activity activity)
// {
// var name = activity.Message.Split(" ")[0];
// var label = new Label($"<color=#FED700>{name}</color> {activity.Message[name.Length..]}");
// activityScrollView.Add(label);
// activityScrollView.contentContainer.RegisterCallbackOnce<GeometryChangedEvent>(_ =>
// {
// var targetScroll = activityScrollView.horizontalScroller.highValue;
// var currentScroll = activityScrollView.scrollOffset;
// activityScrollView.schedule.Execute(() =>
// {
// var newOffset = Mathf.Lerp(currentScroll.x, targetScroll, 0.15f);
// if (Mathf.Abs(targetScroll - newOffset) < 1f)
// {
// activityScrollView.scrollOffset = new Vector2(targetScroll, currentScroll.y);
// return;
// }
// currentScroll.x = newOffset;
// activityScrollView.scrollOffset = currentScroll;
// }).Every(16).Until(() => Mathf.Abs(activityScrollView.scrollOffset.x - targetScroll) < 1f);
// });
// }
private void OnChallengeButtonClicked()
{
var name = activity.Message.Split(" ")[0];
var label = new Label($"<color=#FED700>{name}</color> {activity.Message[name.Length..]}");
activityScrollView.Add(label);
activityScrollView.contentContainer.RegisterCallbackOnce<GeometryChangedEvent>(_ =>
{
var targetScroll = activityScrollView.horizontalScroller.highValue;
var currentScroll = activityScrollView.scrollOffset;
activityScrollView.schedule.Execute(() =>
{
var newOffset = Mathf.Lerp(currentScroll.x, targetScroll, 0.15f);
if (Mathf.Abs(targetScroll - newOffset) < 1f)
{
activityScrollView.scrollOffset = new Vector2(targetScroll, currentScroll.y);
return;
}
currentScroll.x = newOffset;
activityScrollView.scrollOffset = currentScroll;
}).Every(16).Until(() => Mathf.Abs(activityScrollView.scrollOffset.x - targetScroll) < 1f);
});
var challenge = Instantiate(challengePrefab);
var challengeManager = challenge.GetComponent<ChallengeManager>();
challengeManager.StartChallenge();
}
}
......@@ -7,12 +7,12 @@ public class LeaderboardController : MonoBehaviour
{
[SerializeField] private UIDocument leaderboardDocument;
private VisualElement leaderboardScrollView;
private ScrollView leaderboardScrollView;
void Awake()
{
var root = leaderboardDocument.rootVisualElement;
leaderboardScrollView = root.Q<VisualElement>("LeadboardContent");
leaderboardScrollView = root.Q<ScrollView>("Leaderboard");
LoadLeaderboard().Forget();
}
......@@ -37,7 +37,7 @@ public class LeaderboardController : MonoBehaviour
var player = players[i];
var entry = new CustomLeaderboardSlot
{
PlayerName = player.DisplayName,
PlayerName = player.UserName,
Rank = AppUtils.RankToArabic(player.Rank),
XP = player.Points.ToString(),
Index = player.Position.ToString(),
......@@ -80,7 +80,7 @@ public class LeaderboardController : MonoBehaviour
return;
}
name.text = player.DisplayName;
name.text = player.UserName;
xp.text = player.Points.ToString();
}
}
......
......@@ -4,68 +4,48 @@ using UnityEngine.UIElements;
public class LoginController : MonoBehaviour
{
[SerializeField] private UIDocument uIDocument;
private TextField emailInputField;
private TextField passwordInputField;
private Button loginButton;
private TextField signUpFullname;
private TextField signUpUsername;
private TextField signUpemail;
private TextField signUppassword;
private Button signUpButton;
private TextField username;
private DropdownField grade;
private DropdownField school;
private DropdownField sex;
private TextField age;
private VisualElement loginRoot;
private VisualElement registerRoot;
private Button register;
private void OnEnable()
{
loginRoot = uIDocument.rootVisualElement.Q("ContantPanel");
registerRoot = uIDocument.rootVisualElement.Q("RegisterPanel");
var root = uIDocument.rootVisualElement;
emailInputField = loginRoot.Q<TextField>("LoginEmail");
passwordInputField = loginRoot.Q<TextField>("LoginPassword");
loginButton = loginRoot.Q<Button>("Login");
username = root.Q<TextField>("Username");
username.languageDirection = LanguageDirection.RTL;
signUpFullname = registerRoot.Q<TextField>("FullName");
signUpUsername = registerRoot.Q<TextField>("Username");
signUpemail = registerRoot.Q<TextField>("Email");
signUppassword = registerRoot.Q<TextField>("Password");
signUpButton = registerRoot.Q<Button>("Register");
grade = root.Q<DropdownField>("Grade");
school = root.Q<DropdownField>("School");
sex = root.Q<DropdownField>("Sex");
age = root.Q<TextField>("Age");
register = root.Q<Button>("Register");
loginButton.clicked += Login;
signUpButton.clicked += ShowRegister;
register.clicked += RegisterAnon;
}
private void OnDisable()
{
loginButton.clicked -= Login;
signUpButton.clicked -= ShowRegister;
register.clicked -= RegisterAnon;
}
private async void Login()
{
string email = emailInputField.text;
string password = passwordInputField.text;
var login = await SupabaseAuthentication.Instance.LogIn(email, password);
login.Switch(
(_) => { },
(string error) => { Debug.LogError(error); }
);
}
public async void ShowRegister()
public async void RegisterAnon()
{
string fullname = signUpFullname.text;
string username = signUpUsername.text;
string email = signUpemail.text;
string password = signUppassword.text;
var signUp = await SupabaseAuthentication.Instance.SignUp(email, password, username, fullname);
signUp.Switch(
(_) => { },
(string error) => { Debug.LogError(error); }
);
print(username.text + grade.value + school.value + sex.value + age.text);
var signUp = await UserService.Instance.CreateUserProfile(username.text, grade.value, school.value, sex.value, age.text);
signUp.Switch(user =>
{
Debug.Log("User created successfully");
}, error =>
{
Debug.LogError($"Failed to create user: {error.Message}");
});
}
......
......@@ -26,7 +26,7 @@ public class ProfileController : MonoBehaviour
private void OnUserChange(User user)
{
name.text = user.DisplayName;
name.text = user.Username;
rank.text = AppUtils.RankToArabic(user.Rank);
xp.text = user.Points.ToString();
......
This diff is collapsed.
......@@ -149,6 +149,8 @@ Transform:
m_ConstrainProportionsScale: 0
m_Children:
- {fileID: 918718236}
- {fileID: 1841206267}
- {fileID: 803660555}
m_Father: {fileID: 2035341440}
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!1 &659928730
......@@ -184,6 +186,51 @@ Transform:
- {fileID: 1455761155}
m_Father: {fileID: 2035341440}
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!1 &803660554
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 803660555}
- component: {fileID: 803660556}
m_Layer: 0
m_Name: Leaderboard Controller
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!4 &803660555
Transform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 803660554}
serializedVersion: 2
m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
m_LocalPosition: {x: -6.307274, y: 366.3949, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
m_ConstrainProportionsScale: 0
m_Children: []
m_Father: {fileID: 652396694}
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!114 &803660556
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 803660554}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 15e0930515e265210811f31b2b312b18, type: 3}
m_Name:
m_EditorClassIdentifier: Assembly-CSharp::LeaderboardController
leaderboardDocument: {fileID: 1455761156}
--- !u!1 &918718235
GameObject:
m_ObjectHideFlags: 0
......@@ -500,6 +547,97 @@ Camera:
m_OcclusionCulling: 1
m_StereoConvergence: 10
m_StereoSeparation: 0.022
--- !u!1 &1709733323
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 1709733325}
- component: {fileID: 1709733324}
m_Layer: 0
m_Name: TransitionManager
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!114 &1709733324
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1709733323}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 61430b0086307cc4da3ccc8d39ae88da, type: 3}
m_Name:
m_EditorClassIdentifier: Assembly-CSharp::EasyTransition.TransitionManager
transitionTemplate: {fileID: 5276914992623515724, guid: 616d511151a6c554caddf1c754e4f91d, type: 3}
--- !u!4 &1709733325
Transform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1709733323}
serializedVersion: 2
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 0, y: 1, 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 &1841206265
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 1841206267}
- component: {fileID: 1841206266}
m_Layer: 0
m_Name: MainMenuController
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!114 &1841206266
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1841206265}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 6abd7c2813215344aacce964e4964aac, type: 3}
m_Name:
m_EditorClassIdentifier: Assembly-CSharp::HomeController
mainMenuDocument: {fileID: 1455761156}
challengePrefab: {fileID: 6263250232599778082, guid: adacfd07019fd8f4bbd5a9347da9f201, type: 3}
--- !u!4 &1841206267
Transform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1841206265}
serializedVersion: 2
m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
m_LocalPosition: {x: -6.307274, y: 366.3949, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
m_ConstrainProportionsScale: 0
m_Children: []
m_Father: {fileID: 652396694}
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!1 &2035341439
GameObject:
m_ObjectHideFlags: 0
......@@ -539,3 +677,4 @@ SceneRoots:
m_ObjectHideFlags: 0
m_Roots:
- {fileID: 2035341440}
- {fileID: 1709733325}
......@@ -150,6 +150,7 @@ MonoBehaviour:
m_Name:
m_EditorClassIdentifier: Assembly-CSharp::SessionListener
SupabaseManager: {fileID: 689087718}
splash: {fileID: 1946331747}
LoggedIn:
m_PersistentCalls:
m_Calls:
......@@ -180,6 +181,21 @@ MonoBehaviour:
m_StringArgument:
m_BoolArgument: 0
m_CallState: 2
NewUser:
m_PersistentCalls:
m_Calls:
- m_Target: {fileID: 1113388152}
m_TargetAssemblyTypeName: LoginPageAnimation, Assembly-CSharp
m_MethodName: RegiserOpen
m_Mode: 1
m_Arguments:
m_ObjectArgument: {fileID: 0}
m_ObjectArgumentAssemblyTypeName: UnityEngine.Object, UnityEngine
m_IntArgument: 0
m_FloatArgument: 0
m_StringArgument:
m_BoolArgument: 0
m_CallState: 2
--- !u!4 &232732870
Transform:
m_ObjectHideFlags: 0
......@@ -241,6 +257,100 @@ Transform:
- {fileID: 2025346609}
m_Father: {fileID: 0}
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!1 &639516600
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 639516601}
- component: {fileID: 639516603}
- component: {fileID: 639516602}
m_Layer: 5
m_Name: GameObject
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!224 &639516601
RectTransform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 639516600}
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: 793411418}
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: 0, y: 0}
m_SizeDelta: {x: 586.0189, y: 288.1363}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!114 &639516602
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 639516600}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: beaa34cb0e58d624bb3a264b28600785, type: 3}
m_Name:
m_EditorClassIdentifier: LightSide.UniText::LightSide.UniText
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: []
text: "\u062C\u0627\u0631\u064A \u0627\u0644\u062A\u062D\u0645\u064A\u0644...."
fontStack: {fileID: 11400000, guid: 0029e5efb4c7a12f1ac9136de794e6dc, type: 2}
appearance: {fileID: 11400000, guid: 3a559cf5d653f05ea807e1be5655df92, type: 2}
fontSize: 72
baseDirection: 2
wordWrap: 1
horizontalAlignment: 1
verticalAlignment: 1
overEdge: 0
underEdge: 0
leadingDistribution: 0
autoSize: 1
minFontSize: 10
maxFontSize: 72
modRegisters:
items: []
modRegisterConfigs:
items: []
highlighter:
rid: 8674289297877106688
references:
version: 2
RefIds:
- rid: 8674289297877106688
type: {class: DefaultTextHighlighter, ns: LightSide, asm: LightSide.UniText}
data:
clickColor: {r: 0.2, g: 0.5, b: 1, a: 0.6}
fadeDuration: 0.25
hoverColor: {r: 0.2, g: 0.5, b: 1, a: 0.1}
--- !u!222 &639516603
CanvasRenderer:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 639516600}
m_CullTransparentMesh: 1
--- !u!1 &689087716
GameObject:
m_ObjectHideFlags: 0
......@@ -286,6 +396,82 @@ MonoBehaviour:
m_Name:
m_EditorClassIdentifier: Assembly-CSharp::SupabaseManager
SessionListener: {fileID: 232732869}
--- !u!1 &793411417
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 793411418}
- component: {fileID: 793411420}
- component: {fileID: 793411419}
m_Layer: 5
m_Name: Panel
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!224 &793411418
RectTransform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 793411417}
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: 639516601}
m_Father: {fileID: 1946331747}
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0, y: 0}
m_AnchorMax: {x: 1, y: 1}
m_AnchoredPosition: {x: 0, y: 0}
m_SizeDelta: {x: 0, y: 0}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!114 &793411419
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 793411417}
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: 0, g: 0.046317577, b: 1, a: 1}
m_RaycastTarget: 1
m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0}
m_Maskable: 1
m_OnCullStateChanged:
m_PersistentCalls:
m_Calls: []
m_Sprite: {fileID: 10907, guid: 0000000000000000f000000000000000, type: 0}
m_Type: 1
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 &793411420
CanvasRenderer:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 793411417}
m_CullTransparentMesh: 1
--- !u!1 &1113388150
GameObject:
m_ObjectHideFlags: 0
......@@ -532,6 +718,108 @@ MonoBehaviour:
m_Name:
m_EditorClassIdentifier: Assembly-CSharp::LoginController
uIDocument: {fileID: 2143987065}
--- !u!1 &1946331743
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 1946331747}
- component: {fileID: 1946331746}
- component: {fileID: 1946331745}
- component: {fileID: 1946331744}
m_Layer: 5
m_Name: Canvas
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!114 &1946331744
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1946331743}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: dc42784cf147c0c48a680349fa168899, type: 3}
m_Name:
m_EditorClassIdentifier: UnityEngine.UI::UnityEngine.UI.GraphicRaycaster
m_IgnoreReversedGraphics: 1
m_BlockingObjects: 0
m_BlockingMask:
serializedVersion: 2
m_Bits: 4294967295
--- !u!114 &1946331745
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1946331743}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 0cd44c1031e13a943bb63640046fad76, type: 3}
m_Name:
m_EditorClassIdentifier: UnityEngine.UI::UnityEngine.UI.CanvasScaler
m_UiScaleMode: 0
m_ReferencePixelsPerUnit: 100
m_ScaleFactor: 1
m_ReferenceResolution: {x: 800, y: 600}
m_ScreenMatchMode: 0
m_MatchWidthOrHeight: 0
m_PhysicalUnit: 3
m_FallbackScreenDPI: 96
m_DefaultSpriteDPI: 96
m_DynamicPixelsPerUnit: 1
m_PresetInfoIsWorld: 0
--- !u!223 &1946331746
Canvas:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1946331743}
m_Enabled: 1
serializedVersion: 3
m_RenderMode: 0
m_Camera: {fileID: 0}
m_PlaneDistance: 100
m_PixelPerfect: 0
m_ReceivesEvents: 1
m_OverrideSorting: 0
m_OverridePixelPerfect: 0
m_SortingBucketNormalizedSize: 0
m_VertexColorAlwaysGammaSpace: 0
m_AdditionalShaderChannelsFlag: 9
m_UpdateRectTransformForStandalone: 0
m_SortingLayerID: 0
m_SortingOrder: 30
m_TargetDisplay: 0
--- !u!224 &1946331747
RectTransform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1946331743}
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 0, y: 0, z: 0}
m_ConstrainProportionsScale: 0
m_Children:
- {fileID: 793411418}
m_Father: {fileID: 0}
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0, y: 0}
m_AnchorMax: {x: 0, y: 0}
m_AnchoredPosition: {x: 0, y: 0}
m_SizeDelta: {x: 0, y: 0}
m_Pivot: {x: 0, y: 0}
--- !u!1 &2025346608
GameObject:
m_ObjectHideFlags: 0
......@@ -765,3 +1053,4 @@ SceneRoots:
- {fileID: 1486533217}
- {fileID: 689087717}
- {fileID: 414692744}
- {fileID: 1946331747}
......@@ -455,6 +455,51 @@ MonoBehaviour:
m_Name:
m_EditorClassIdentifier: Assembly-CSharp::HomeController
mainMenuDocument: {fileID: 96388575}
--- !u!1 &1292705846
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 1292705848}
- component: {fileID: 1292705847}
m_Layer: 0
m_Name: TransitionManager
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!114 &1292705847
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1292705846}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 61430b0086307cc4da3ccc8d39ae88da, type: 3}
m_Name:
m_EditorClassIdentifier: Assembly-CSharp::EasyTransition.TransitionManager
transitionTemplate: {fileID: 5276914992623515724, guid: 616d511151a6c554caddf1c754e4f91d, type: 3}
--- !u!4 &1292705848
Transform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1292705846}
serializedVersion: 2
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 562.3606, y: 1200, 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 &1859771920
GameObject:
m_ObjectHideFlags: 0
......@@ -672,8 +717,67 @@ Transform:
- {fileID: 1859771921}
m_Father: {fileID: 744843710}
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!1001 &4120289109424012036
PrefabInstance:
m_ObjectHideFlags: 0
serializedVersion: 2
m_Modification:
serializedVersion: 3
m_TransformParent: {fileID: 0}
m_Modifications:
- target: {fileID: 5598053833061982756, guid: adacfd07019fd8f4bbd5a9347da9f201, type: 3}
propertyPath: m_LocalPosition.x
value: 254.03662
objectReference: {fileID: 0}
- target: {fileID: 5598053833061982756, guid: adacfd07019fd8f4bbd5a9347da9f201, type: 3}
propertyPath: m_LocalPosition.y
value: 356.294
objectReference: {fileID: 0}
- target: {fileID: 5598053833061982756, guid: adacfd07019fd8f4bbd5a9347da9f201, type: 3}
propertyPath: m_LocalPosition.z
value: 0
objectReference: {fileID: 0}
- target: {fileID: 5598053833061982756, guid: adacfd07019fd8f4bbd5a9347da9f201, type: 3}
propertyPath: m_LocalRotation.w
value: 1
objectReference: {fileID: 0}
- target: {fileID: 5598053833061982756, guid: adacfd07019fd8f4bbd5a9347da9f201, type: 3}
propertyPath: m_LocalRotation.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 5598053833061982756, guid: adacfd07019fd8f4bbd5a9347da9f201, type: 3}
propertyPath: m_LocalRotation.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 5598053833061982756, guid: adacfd07019fd8f4bbd5a9347da9f201, type: 3}
propertyPath: m_LocalRotation.z
value: 0
objectReference: {fileID: 0}
- target: {fileID: 5598053833061982756, guid: adacfd07019fd8f4bbd5a9347da9f201, type: 3}
propertyPath: m_LocalEulerAnglesHint.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 5598053833061982756, guid: adacfd07019fd8f4bbd5a9347da9f201, type: 3}
propertyPath: m_LocalEulerAnglesHint.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 5598053833061982756, guid: adacfd07019fd8f4bbd5a9347da9f201, type: 3}
propertyPath: m_LocalEulerAnglesHint.z
value: 0
objectReference: {fileID: 0}
- target: {fileID: 6263250232599778082, guid: adacfd07019fd8f4bbd5a9347da9f201, type: 3}
propertyPath: m_Name
value: ChallengeManager
objectReference: {fileID: 0}
m_RemovedComponents: []
m_RemovedGameObjects: []
m_AddedGameObjects: []
m_AddedComponents: []
m_SourcePrefab: {fileID: 100100000, guid: adacfd07019fd8f4bbd5a9347da9f201, type: 3}
--- !u!1660057539 &9223372036854775807
SceneRoots:
m_ObjectHideFlags: 0
m_Roots:
- {fileID: 744843710}
- {fileID: 4120289109424012036}
- {fileID: 1292705848}
......@@ -12,10 +12,10 @@ public class LoginPageAnimation : MonoBehaviour
Application.targetFrameRate = 60;
ContantPanel = loginPage.rootVisualElement.Q<VisualElement>("ContantPanel");
}
ContantPanel.schedule.Execute(() =>
{
ContantPanel.style.translate = new StyleTranslate(new Translate(0, 0));
}).StartingIn(750);
public void ShowLogin()
{
ContantPanel.style.translate = new StyleTranslate(new Translate(0, 0));
}
}
fileFormatVersion: 2
guid: 1cacea281266a5b43816aaa1a5034bf7
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:
fileFormatVersion: 2
guid: 8aaea1c6a0272be419661b4614efb857
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:
using UnityEngine;
namespace EasyTransition
{
public class DemoLoadScene : MonoBehaviour
{
public TransitionSettings transition;
public float startDelay;
public void LoadScene(string _sceneName)
{
TransitionManager.Instance().Transition(_sceneName, transition, startDelay);
}
}
}
fileFormatVersion: 2
guid: 3bb84b9801d302a448833f1fb2f6166c
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {fileID: 2800000, guid: e60853cfffc760a4f899906440a6a3cf, type: 3}
userData:
assetBundleName:
assetBundleVariant:
AssetOrigin:
serializedVersion: 1
productId: 225607
packageName: Easy Transitions
packageVersion: 1.4
assetPath: Assets/EasyTransitions/Demo/DemoLoadScene.cs
uploadId: 587727
This diff is collapsed.
fileFormatVersion: 2
guid: 260da7986ce92f1459a913911210a3d0
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:
AssetOrigin:
serializedVersion: 1
productId: 225607
packageName: Easy Transitions
packageVersion: 1.4
assetPath: Assets/EasyTransitions/Demo/TransitionDemo.unity
uploadId: 587727
fileFormatVersion: 2
guid: 62e2a1b964e6c6841bb6f656211e4470
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:
AssetOrigin:
serializedVersion: 1
productId: 225607
packageName: Easy Transitions
packageVersion: 1.4
assetPath: Assets/EasyTransitions/Documentation.pdf
uploadId: 587727
fileFormatVersion: 2
guid: 19ef3e267d0f4214ab7d930e1381ef4e
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:
using UnityEngine;
using UnityEditor;
namespace EasyTransition
{
[CanEditMultipleObjects]
[CustomEditor(typeof(TransitionManager))]
public class TransitionManagerEditor : Editor
{
public override void OnInspectorGUI()
{
EditorGUILayout.Space();
}
}
}
fileFormatVersion: 2
guid: 282abae78b5a04b4d80335eac305e42d
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {fileID: 2800000, guid: e60853cfffc760a4f899906440a6a3cf, type: 3}
userData:
assetBundleName:
assetBundleVariant:
AssetOrigin:
serializedVersion: 1
productId: 225607
packageName: Easy Transitions
packageVersion: 1.4
assetPath: Assets/EasyTransitions/Editor/TransitionManagerEditor.cs
uploadId: 587727
using UnityEngine;
using UnityEditor;
namespace EasyTransition
{
[CanEditMultipleObjects]
[CustomEditor(typeof(TransitionSettings))]
public class TransitionSettingsEditor : Editor
{
public Texture transitionManagerSettingsLogo;
SerializedProperty transitionsList;
void OnEnable()
{
transitionsList = serializedObject.FindProperty("transitions");
}
public override void OnInspectorGUI()
{
serializedObject.Update();
var bgTexture = new Texture2D(1, 1, TextureFormat.RGBAFloat, false);
var style = new GUIStyle(GUI.skin.box);
style.normal.background = bgTexture;
GUILayout.Box(transitionManagerSettingsLogo, style, GUILayout.Width(Screen.width - 20), GUILayout.Height(Screen.height / 15));
EditorGUILayout.Space();
DrawDefaultInspector();
serializedObject.ApplyModifiedProperties();
}
}
}
fileFormatVersion: 2
guid: c60f4a1703f193542b97665edbd207a5
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences:
- transitionManagerSettingsLogo: {fileID: 2800000, guid: 35869fd26108add4d8b2fe1a0a6b8009,
type: 3}
executionOrder: 0
icon: {fileID: 2800000, guid: eeeb98c0445060a44895c2b15fa2d04d, type: 3}
userData:
assetBundleName:
assetBundleVariant:
AssetOrigin:
serializedVersion: 1
productId: 225607
packageName: Easy Transitions
packageVersion: 1.4
assetPath: Assets/EasyTransitions/Editor/TransitionSettingsEditor.cs
uploadId: 587727
fileFormatVersion: 2
guid: 14c74e5b4386b1d4993db6651c285107
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!21 &2100000
Material:
serializedVersion: 6
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_Name: TransitionUIAdditiveColor
m_Shader: {fileID: 4800000, guid: a265900f697959f42b1f2ad4a17da051, type: 3}
m_ShaderKeywords:
m_LightmapFlags: 4
m_EnableInstancingVariants: 0
m_DoubleSidedGI: 0
m_CustomRenderQueue: -1
stringTagMap: {}
disabledShaderPasses: []
m_SavedProperties:
serializedVersion: 3
m_TexEnvs:
- _AlphaTex:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _BumpMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _DetailAlbedoMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _DetailMask:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _DetailNormalMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _EmissionMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _MainTex:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _MetallicGlossMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _OcclusionMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _ParallaxMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
m_Floats:
- PixelSnap: 0
- _BumpScale: 1
- _ColorMask: 15
- _Cutoff: 0.5
- _DetailNormalMapScale: 1
- _DstBlend: 0
- _EnableExternalAlpha: 0
- _GlossMapScale: 1
- _Glossiness: 0.5
- _GlossyReflections: 1
- _InvFade: 1
- _Metallic: 0
- _Mode: 0
- _OcclusionStrength: 1
- _Parallax: 0.02
- _SmoothnessTextureChannel: 0
- _SpecularHighlights: 1
- _SrcBlend: 1
- _Stencil: 0
- _StencilComp: 8
- _StencilOp: 0
- _StencilReadMask: 255
- _StencilWriteMask: 255
- _UVSec: 0
- _UseUIAlphaClip: 0
- _ZWrite: 1
m_Colors:
- _Color: {r: 1, g: 1, b: 1, a: 1}
- _EmissionColor: {r: 0, g: 0, b: 0, a: 1}
- _Flip: {r: 1, g: 1, b: 1, a: 1}
- _RendererColor: {r: 1, g: 1, b: 1, a: 1}
- _TintColor: {r: 0.5, g: 0.5, b: 0.5, a: 0.5}
m_BuildTextureStacks: []
fileFormatVersion: 2
guid: 65ccb7b6cbefce14eb6f884cfc33ba91
NativeFormatImporter:
externalObjects: {}
mainObjectFileID: 2100000
userData:
assetBundleName:
assetBundleVariant:
AssetOrigin:
serializedVersion: 1
productId: 225607
packageName: Easy Transitions
packageVersion: 1.4
assetPath: Assets/EasyTransitions/Materials/TransitionUIAdditiveColor.mat
uploadId: 587727
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!21 &2100000
Material:
serializedVersion: 6
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_Name: TransitionUIMultiplyColor
m_Shader: {fileID: 4800000, guid: 9a7ce419795e1d243bc4361b47c42a66, type: 3}
m_ShaderKeywords:
m_LightmapFlags: 4
m_EnableInstancingVariants: 0
m_DoubleSidedGI: 0
m_CustomRenderQueue: -1
stringTagMap: {}
disabledShaderPasses: []
m_SavedProperties:
serializedVersion: 3
m_TexEnvs:
- _AlphaTex:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _BumpMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _DetailAlbedoMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _DetailMask:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _DetailNormalMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _EmissionMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _MainTex:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _MetallicGlossMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _OcclusionMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _ParallaxMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
m_Floats:
- PixelSnap: 0
- _BumpScale: 1
- _ColorMask: 15
- _Cutoff: 0.5
- _DetailNormalMapScale: 1
- _DstBlend: 0
- _EnableExternalAlpha: 0
- _GlossMapScale: 1
- _Glossiness: 0.5
- _GlossyReflections: 1
- _InvFade: 1
- _Metallic: 0
- _Mode: 0
- _OcclusionStrength: 1
- _Parallax: 0.02
- _SmoothnessTextureChannel: 0
- _SpecularHighlights: 1
- _SrcBlend: 1
- _Stencil: 0
- _StencilComp: 8
- _StencilOp: 0
- _StencilReadMask: 255
- _StencilWriteMask: 255
- _UVSec: 0
- _UseUIAlphaClip: 0
- _ZWrite: 1
m_Colors:
- _Color: {r: 1, g: 1, b: 1, a: 1}
- _EmissionColor: {r: 0, g: 0, b: 0, a: 1}
- _Flip: {r: 1, g: 1, b: 1, a: 1}
- _RendererColor: {r: 1, g: 1, b: 1, a: 1}
- _TintColor: {r: 0.5, g: 0.5, b: 0.5, a: 0.5}
m_BuildTextureStacks: []
fileFormatVersion: 2
guid: 53171468e32441749b007c64337cd3db
NativeFormatImporter:
externalObjects: {}
mainObjectFileID: 2100000
userData:
assetBundleName:
assetBundleVariant:
AssetOrigin:
serializedVersion: 1
productId: 225607
packageName: Easy Transitions
packageVersion: 1.4
assetPath: Assets/EasyTransitions/Materials/TransitionUIMultiplyColor.mat
uploadId: 587727
fileFormatVersion: 2
guid: f60a2d09024be6e43bb8edf9644a4abe
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!1 &5276914992623515724
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 5276914992623515722}
- component: {fileID: 5276914992623515723}
m_Layer: 0
m_Name: TransitionTemplate
m_TagString: Untagged
m_Icon: {fileID: 2800000, guid: 0a9be0e727574c34d9695b80b72cd877, type: 3}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!4 &5276914992623515722
Transform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 5276914992623515724}
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_Children:
- {fileID: 5276914993337012672}
m_Father: {fileID: 0}
m_RootOrder: 0
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!114 &5276914992623515723
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 5276914992623515724}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: b4666d1a46cb76542b7e6e7a7f4893cc, type: 3}
m_Name:
m_EditorClassIdentifier:
transitionSettings:
transitionID: TransitionName
refrenceResolution: {x: 1920, y: 1080}
blockRaycasts: 0
colorTintMode: 0
colorTint: {r: 1, g: 1, b: 1, a: 1}
isCutoutTransition: 0
transitionSpeed: 1
autoAdjustTransitionTime: 0
flipX: 0
flipY: 0
transitionTime: 1.5
destroyTime: 5
transitionIn: {fileID: 0}
transitionOut: {fileID: 0}
fullSettings: {fileID: 0}
transitionPanelIN: {fileID: 5276914993564077022}
transitionPanelOUT: {fileID: 5276914992933122024}
transitionCanvas: {fileID: 5276914993337012702}
multiplyColorMaterial: {fileID: 0}
additiveColorMaterial: {fileID: 0}
--- !u!1 &5276914992933122025
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 5276914992933122024}
- component: {fileID: 5276914992933122023}
m_Layer: 5
m_Name: TransitionOUT-Panel
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!224 &5276914992933122024
RectTransform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 5276914992933122025}
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_Children: []
m_Father: {fileID: 5276914993337012672}
m_RootOrder: 1
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0, y: 0}
m_AnchorMax: {x: 1, y: 1}
m_AnchoredPosition: {x: 0, y: 0}
m_SizeDelta: {x: 0, y: 0}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!222 &5276914992933122023
CanvasRenderer:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 5276914992933122025}
m_CullTransparentMesh: 1
--- !u!1 &5276914993337012673
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 5276914993337012672}
- component: {fileID: 5276914993337012701}
- component: {fileID: 5276914993337012702}
- component: {fileID: 5276914993337012703}
m_Layer: 5
m_Name: Canvas
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!224 &5276914993337012672
RectTransform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 5276914993337012673}
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 0, y: 0, z: 0}
m_Children:
- {fileID: 5276914993564077022}
- {fileID: 5276914992933122024}
m_Father: {fileID: 5276914992623515722}
m_RootOrder: 0
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0, y: 0}
m_AnchorMax: {x: 0, y: 0}
m_AnchoredPosition: {x: 0, y: 0}
m_SizeDelta: {x: 0, y: 0}
m_Pivot: {x: 0, y: 0}
--- !u!223 &5276914993337012701
Canvas:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 5276914993337012673}
m_Enabled: 1
serializedVersion: 3
m_RenderMode: 0
m_Camera: {fileID: 0}
m_PlaneDistance: 100
m_PixelPerfect: 0
m_ReceivesEvents: 1
m_OverrideSorting: 0
m_OverridePixelPerfect: 0
m_SortingBucketNormalizedSize: 0
m_AdditionalShaderChannelsFlag: 0
m_SortingLayerID: 0
m_SortingOrder: 32767
m_TargetDisplay: 0
--- !u!114 &5276914993337012702
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 5276914993337012673}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 0cd44c1031e13a943bb63640046fad76, type: 3}
m_Name:
m_EditorClassIdentifier:
m_UiScaleMode: 1
m_ReferencePixelsPerUnit: 100
m_ScaleFactor: 1
m_ReferenceResolution: {x: 1920, y: 1080}
m_ScreenMatchMode: 0
m_MatchWidthOrHeight: 0.5
m_PhysicalUnit: 3
m_FallbackScreenDPI: 96
m_DefaultSpriteDPI: 96
m_DynamicPixelsPerUnit: 1
m_PresetInfoIsWorld: 0
--- !u!114 &5276914993337012703
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 5276914993337012673}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: dc42784cf147c0c48a680349fa168899, type: 3}
m_Name:
m_EditorClassIdentifier:
m_IgnoreReversedGraphics: 1
m_BlockingObjects: 0
m_BlockingMask:
serializedVersion: 2
m_Bits: 4294967295
--- !u!1 &5276914993564077023
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 5276914993564077022}
- component: {fileID: 5276914993564077021}
m_Layer: 5
m_Name: TransitionIN-Panel
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!224 &5276914993564077022
RectTransform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 5276914993564077023}
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_Children: []
m_Father: {fileID: 5276914993337012672}
m_RootOrder: 0
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0, y: 0}
m_AnchorMax: {x: 1, y: 1}
m_AnchoredPosition: {x: 0, y: 0}
m_SizeDelta: {x: 0, y: 0}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!222 &5276914993564077021
CanvasRenderer:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 5276914993564077023}
m_CullTransparentMesh: 1
fileFormatVersion: 2
guid: 616d511151a6c554caddf1c754e4f91d
PrefabImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:
AssetOrigin:
serializedVersion: 1
productId: 225607
packageName: Easy Transitions
packageVersion: 1.4
assetPath: Assets/EasyTransitions/Prefabs/TransitionTemplate.prefab
uploadId: 587727
fileFormatVersion: 2
guid: 6db21b846ebf1dc40be35446c959f82a
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:
using UnityEngine;
using UnityEngine.UI;
using UnityEngine.Rendering;
namespace EasyTransition
{
public class CutoutMaskUI : Image
{
public override Material materialForRendering {
get
{
Material material = new Material(base.materialForRendering);
material.SetInt("_StencilComp", (int)CompareFunction.NotEqual);
return material;
}
}
}
}
fileFormatVersion: 2
guid: a798db68994659e4f9c30463aa5d5ae3
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {fileID: 10912, guid: 0000000000000000f000000000000000, type: 0}
userData:
assetBundleName:
assetBundleVariant:
AssetOrigin:
serializedVersion: 1
productId: 225607
packageName: Easy Transitions
packageVersion: 1.4
assetPath: Assets/EasyTransitions/Scripts/CutoutMaskUI.cs
uploadId: 587727
using UnityEngine;
using UnityEngine.SceneManagement;
using UnityEngine.UI;
namespace EasyTransition
{
public class Transition : MonoBehaviour
{
public TransitionSettings transitionSettings;
public Transform transitionPanelIN;
public Transform transitionPanelOUT;
public CanvasScaler transitionCanvas;
public Material multiplyColorMaterial;
public Material additiveColorMaterial;
bool hasTransitionTriggeredOnce;
private void Start()
{
//Making sure not to destroy the transition when a new scene gets load
DontDestroyOnLoad(gameObject);
//Setting the resolution of the transition canvas
transitionCanvas.referenceResolution = transitionSettings.refrenceResolution;
transitionPanelIN.gameObject.SetActive(false);
transitionPanelOUT.gameObject.SetActive(false);
//Setting up the transition objects
transitionPanelIN.gameObject.SetActive(true);
GameObject transitionIn = Instantiate(transitionSettings.transitionIn, transitionPanelIN);
transitionIn.AddComponent<CanvasGroup>().blocksRaycasts = transitionSettings.blockRaycasts;
//Setting the materials
multiplyColorMaterial = transitionSettings.multiplyColorMaterial;
additiveColorMaterial = transitionSettings.addColorMaterial;
//Checking if the materials were correctly set
if (multiplyColorMaterial == null || additiveColorMaterial == null)
Debug.LogWarning("There are no color tint materials set for the transition. Changing the color tint will not affect the transition anymore!");
//Changing the color of the transition
if (!transitionSettings.isCutoutTransition)
{
if (transitionIn.TryGetComponent<Image>(out Image parentImage))
{
if (transitionSettings.colorTintMode == ColorTintMode.Multiply)
{
parentImage.material = multiplyColorMaterial;
parentImage.material.SetColor("_Color", transitionSettings.colorTint);
}
else if (transitionSettings.colorTintMode == ColorTintMode.Add)
{
parentImage.material = additiveColorMaterial;
parentImage.material.SetColor("_Color", transitionSettings.colorTint);
}
}
for (int i = 0; i < transitionIn.transform.childCount; i++)
{
if (transitionIn.transform.GetChild(i).TryGetComponent<Image>(out Image childImage))
{
if (transitionSettings.colorTintMode == ColorTintMode.Multiply)
{
childImage.material = multiplyColorMaterial;
childImage.material.SetColor("_Color", transitionSettings.colorTint);
}
else if (transitionSettings.colorTintMode == ColorTintMode.Add)
{
childImage.material = additiveColorMaterial;
childImage.material.SetColor("_Color", transitionSettings.colorTint);
}
}
}
}
//Flipping the scale if needed
if (transitionSettings.flipX)
transitionIn.transform.localScale = new Vector3(-transitionIn.transform.localScale.x, transitionIn.transform.localScale.y, transitionIn.transform.localScale.z);
if (transitionSettings.flipY)
transitionIn.transform.localScale = new Vector3(transitionIn.transform.localScale.x, -transitionIn.transform.localScale.y, transitionIn.transform.localScale.z);
//Changing the animator speed
if (transitionIn.TryGetComponent<Animator>(out Animator parentAnim) && transitionSettings.transitionSpeed != 0)
parentAnim.speed = transitionSettings.transitionSpeed;
else
{
for (int c = 0; c < transitionIn.transform.childCount; c++)
{
if(transitionIn.transform.GetChild(c).TryGetComponent<Animator>(out Animator childAnim) && transitionSettings.transitionSpeed != 0)
childAnim.speed = transitionSettings.transitionSpeed;
}
}
//Adding the funcion OnSceneLoad() to the sceneLoaded action
SceneManager.sceneLoaded += OnSceneLoad;
}
public void OnSceneLoad(Scene scene, LoadSceneMode mode)
{
//Checking if this transition instance has allready played
if (hasTransitionTriggeredOnce) return;
transitionPanelIN.gameObject.SetActive(false);
//Setting up the transition
transitionPanelOUT.gameObject.SetActive(true);
GameObject transitionOut = Instantiate(transitionSettings.transitionOut, transitionPanelOUT);
transitionOut.AddComponent<CanvasGroup>().blocksRaycasts = transitionSettings.blockRaycasts;
//Changing the color of the transition
if (!transitionSettings.isCutoutTransition)
{
if (transitionOut.TryGetComponent<Image>(out Image parentImage))
{
if (transitionSettings.colorTintMode == ColorTintMode.Multiply)
{
parentImage.material = multiplyColorMaterial;
parentImage.material.SetColor("_Color", transitionSettings.colorTint);
}
else if (transitionSettings.colorTintMode == ColorTintMode.Add)
{
parentImage.material = additiveColorMaterial;
parentImage.material.SetColor("_Color", transitionSettings.colorTint);
}
}
for (int i = 0; i < transitionOut.transform.childCount; i++)
{
if (transitionOut.transform.GetChild(i).TryGetComponent<Image>(out Image childImage))
{
if (transitionSettings.colorTintMode == ColorTintMode.Multiply)
{
childImage.material = multiplyColorMaterial;
childImage.material.SetColor("_Color", transitionSettings.colorTint);
}
else if (transitionSettings.colorTintMode == ColorTintMode.Add)
{
childImage.material = additiveColorMaterial;
childImage.material.SetColor("_Color", transitionSettings.colorTint);
}
}
}
}
//Flipping the scale if needed
if (transitionSettings.flipX)
transitionOut.transform.localScale = new Vector3(-transitionOut.transform.localScale.x, transitionOut.transform.localScale.y, transitionOut.transform.localScale.z);
if (transitionSettings.flipY)
transitionOut.transform.localScale = new Vector3(transitionOut.transform.localScale.x, -transitionOut.transform.localScale.y, transitionOut.transform.localScale.z);
//Changeing the animator speed
if (transitionOut.TryGetComponent<Animator>(out Animator parentAnim) && transitionSettings.transitionSpeed != 0)
parentAnim.speed = transitionSettings.transitionSpeed;
else
{
for (int c = 0; c < transitionOut.transform.childCount; c++)
{
if (transitionOut.transform.GetChild(c).TryGetComponent<Animator>(out Animator childAnim) && transitionSettings.transitionSpeed != 0)
childAnim.speed = transitionSettings.transitionSpeed;
}
}
//Turning on a safety switch so this transition instance cannot be triggered more than once
hasTransitionTriggeredOnce = true;
//Adjusting the destroy time if needed
float destroyTime = transitionSettings.destroyTime;
if (transitionSettings.autoAdjustTransitionTime)
destroyTime = destroyTime / transitionSettings.transitionSpeed;
//Destroying the transition
Destroy(gameObject, destroyTime);
}
}
}
fileFormatVersion: 2
guid: b4666d1a46cb76542b7e6e7a7f4893cc
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences:
- transitionPanelIN: {instanceID: 0}
- transitionPanelOUT: {instanceID: 0}
- transitionCanvas: {instanceID: 0}
- multiplyColorMaterial: {fileID: 2100000, guid: 53171468e32441749b007c64337cd3db,
type: 2}
- additiveColorMaterial: {fileID: 2100000, guid: 65ccb7b6cbefce14eb6f884cfc33ba91,
type: 2}
executionOrder: 0
icon: {fileID: 2800000, guid: e60853cfffc760a4f899906440a6a3cf, type: 3}
userData:
assetBundleName:
assetBundleVariant:
AssetOrigin:
serializedVersion: 1
productId: 225607
packageName: Easy Transitions
packageVersion: 1.4
assetPath: Assets/EasyTransitions/Scripts/Transition.cs
uploadId: 587727
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.SceneManagement;
using UnityEngine.Events;
namespace EasyTransition
{
public class TransitionManager : MonoBehaviour
{
[SerializeField] private GameObject transitionTemplate;
private bool runningTransition;
public UnityAction onTransitionBegin;
public UnityAction onTransitionCutPointReached;
public UnityAction onTransitionEnd;
private static TransitionManager instance;
private void Awake()
{
instance = this;
}
public static TransitionManager Instance()
{
if (instance == null)
Debug.LogError("You tried to access the instance before it exists.");
return instance;
}
/// <summary>
/// Starts a transition without loading a new level.
/// </summary>
/// <param name="transition">The settings of the transition you want to use.</param>
/// <param name="startDelay">The delay before the transition starts.</param>
public void Transition(TransitionSettings transition, float startDelay)
{
if (transition == null || runningTransition)
{
Debug.LogError("You have to assing a transition.");
return;
}
runningTransition = true;
StartCoroutine(Timer(startDelay, transition));
}
/// <summary>
/// Loads the new Scene with a transition.
/// </summary>
/// <param name="sceneName">The name of the scene you want to load.</param>
/// <param name="transition">The settings of the transition you want to use to load you new scene.</param>
/// <param name="startDelay">The delay before the transition starts.</param>
public void Transition(string sceneName, TransitionSettings transition, float startDelay)
{
if (transition == null || runningTransition)
{
Debug.LogError("You have to assing a transition.");
return;
}
runningTransition = true;
StartCoroutine(Timer(sceneName, startDelay, transition));
}
/// <summary>
/// Loads the new Scene with a transition.
/// </summary>
/// <param name="sceneIndex">The index of the scene you want to load.</param>
/// <param name="transition">The settings of the transition you want to use to load you new scene.</param>
/// <param name="startDelay">The delay before the transition starts.</param>
public void Transition(int sceneIndex, TransitionSettings transition, float startDelay)
{
if (transition == null || runningTransition)
{
Debug.LogError("You have to assing a transition.");
return;
}
runningTransition = true;
StartCoroutine(Timer(sceneIndex, startDelay, transition));
}
/// <summary>
/// Gets the index of a scene from its name.
/// </summary>
/// <param name="sceneName">The name of the scene you want to get the index of.</param>
int GetSceneIndex(string sceneName)
{
return SceneManager.GetSceneByName(sceneName).buildIndex;
}
IEnumerator Timer(string sceneName, float startDelay, TransitionSettings transitionSettings)
{
yield return new WaitForSecondsRealtime(startDelay);
onTransitionBegin?.Invoke();
GameObject template = Instantiate(transitionTemplate) as GameObject;
template.GetComponent<Transition>().transitionSettings = transitionSettings;
float transitionTime = transitionSettings.transitionTime;
if (transitionSettings.autoAdjustTransitionTime)
transitionTime = transitionTime / transitionSettings.transitionSpeed;
yield return new WaitForSecondsRealtime(transitionTime);
onTransitionCutPointReached?.Invoke();
SceneManager.LoadScene(sceneName);
yield return new WaitForSecondsRealtime(transitionSettings.destroyTime);
onTransitionEnd?.Invoke();
}
IEnumerator Timer(int sceneIndex, float startDelay, TransitionSettings transitionSettings)
{
yield return new WaitForSecondsRealtime(startDelay);
onTransitionBegin?.Invoke();
GameObject template = Instantiate(transitionTemplate) as GameObject;
template.GetComponent<Transition>().transitionSettings = transitionSettings;
float transitionTime = transitionSettings.transitionTime;
if (transitionSettings.autoAdjustTransitionTime)
transitionTime = transitionTime / transitionSettings.transitionSpeed;
yield return new WaitForSecondsRealtime(transitionTime);
onTransitionCutPointReached?.Invoke();
SceneManager.LoadScene(sceneIndex);
yield return new WaitForSecondsRealtime(transitionSettings.destroyTime);
onTransitionEnd?.Invoke();
}
IEnumerator Timer(float delay, TransitionSettings transitionSettings)
{
yield return new WaitForSecondsRealtime(delay);
onTransitionBegin?.Invoke();
GameObject template = Instantiate(transitionTemplate) as GameObject;
template.GetComponent<Transition>().transitionSettings = transitionSettings;
float transitionTime = transitionSettings.transitionTime;
if (transitionSettings.autoAdjustTransitionTime)
transitionTime = transitionTime / transitionSettings.transitionSpeed;
yield return new WaitForSecondsRealtime(transitionTime);
onTransitionCutPointReached?.Invoke();
template.GetComponent<Transition>().OnSceneLoad(SceneManager.GetActiveScene(), LoadSceneMode.Single);
yield return new WaitForSecondsRealtime(transitionSettings.destroyTime);
onTransitionEnd?.Invoke();
runningTransition = false;
}
private IEnumerator Start()
{
while (this.gameObject.activeInHierarchy)
{
//Check for multiple instances of the Transition Manager component
var managerCount = GameObject.FindObjectsOfType<TransitionManager>(true).Length;
if (managerCount > 1)
Debug.LogError($"There are {managerCount.ToString()} Transition Managers in your scene. Please ensure there is only one Transition Manager in your scene or overlapping transitions may occur.");
yield return new WaitForSecondsRealtime(1f);
}
}
}
}
fileFormatVersion: 2
guid: 61430b0086307cc4da3ccc8d39ae88da
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences:
- transitionManagerSettings: {fileID: 11400000, guid: 1cba0b4e571c49044835dfa2244f16fd,
type: 2}
- transitionTemplate: {fileID: 5276914992623515724, guid: 616d511151a6c554caddf1c754e4f91d,
type: 3}
executionOrder: 0
icon: {fileID: 2800000, guid: e60853cfffc760a4f899906440a6a3cf, type: 3}
userData:
assetBundleName:
assetBundleVariant:
AssetOrigin:
serializedVersion: 1
productId: 225607
packageName: Easy Transitions
packageVersion: 1.4
assetPath: Assets/EasyTransitions/Scripts/TransitionManager.cs
uploadId: 587727
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
namespace EasyTransition
{
[CreateAssetMenu(fileName = "TransitionSettings", menuName = "Florian Butz/New Transition Settings", order = 0)]
public class TransitionSettings : ScriptableObject
{
[HideInInspector] public Material multiplyColorMaterial;
[HideInInspector] public Material addColorMaterial;
[Header("Transition Settings")]
[Tooltip("The resolution of the canvas the transition was made in. For some transitions this might change.")]
public Vector2 refrenceResolution = new Vector2(1920, 1080);
[Tooltip("If set to true you can't interact with any UI until the transition is over.")]
public bool blockRaycasts = true;
[Space(10)]
[Tooltip("Changes the color tint mode. Multiply just tints the color and Add adds the color to the transition.")]
public ColorTintMode colorTintMode = ColorTintMode.Multiply;
[Tooltip("Changes the color of the transition based on the color tint mode.")]
public Color colorTint = Color.white;
[Tooltip("If the transition uses the UICutoutMask component.")]
public bool isCutoutTransition = false;
[Space(10)]
[Tooltip("Changes the animation speed of the transition. Only works when theres 1 Animator component somewhere on the transition prefab.")]
[Range(0.5f, 2f)]
public float transitionSpeed = 1;
[Tooltip("If you change the transition speed value and set autoAdjustTransitionTime it will automatically change the transition times to fit the new speed.")]
public bool autoAdjustTransitionTime = true;
[Space(10)]
[Tooltip("Sets the size of the transition on the x axis to -1.")]
public bool flipX = false;
[Tooltip("Sets the size of the transition on the y axis to -1.")]
public bool flipY = false;
[Space(10)]
[Tooltip("Time between transition start and scene load in seconds.")]
public float transitionTime = 1.5f;
[Tooltip("Time after scene load within the transition gets destroyed.")]
public float destroyTime = 3f;
[Header("Transition Prefabs")]
[Space(10)]
public GameObject transitionIn;
public GameObject transitionOut;
}
public enum ColorTintMode { Multiply, Add }
}
\ No newline at end of file
fileFormatVersion: 2
guid: bd0208933b0e3a443a9c1b5975c0fcb7
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences:
- multiplyColorMaterial: {fileID: 2100000, guid: 53171468e32441749b007c64337cd3db,
type: 2}
- addColorMaterial: {fileID: 2100000, guid: 65ccb7b6cbefce14eb6f884cfc33ba91, type: 2}
- transitionIn: {instanceID: 0}
- transitionOut: {instanceID: 0}
executionOrder: 0
icon: {fileID: 2800000, guid: eeeb98c0445060a44895c2b15fa2d04d, type: 3}
userData:
assetBundleName:
assetBundleVariant:
AssetOrigin:
serializedVersion: 1
productId: 225607
packageName: Easy Transitions
packageVersion: 1.4
assetPath: Assets/EasyTransitions/Scripts/TransitionSettings.cs
uploadId: 587727
fileFormatVersion: 2
guid: 8327e80e2190b824196f0d5f3226a624
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:
Shader "UI/AdditiveColor" {
Properties
{
[PerRendererData] _MainTex("Sprite Texture", 2D) = "white" {}
_Color("Tint", Color) = (1,1,1,1)
_StencilComp("Stencil Comparison", Float) = 8
_Stencil("Stencil ID", Float) = 0
_StencilOp("Stencil Operation", Float) = 0
_StencilWriteMask("Stencil Write Mask", Float) = 255
_StencilReadMask("Stencil Read Mask", Float) = 255
_ColorMask("Color Mask", Float) = 15
[Toggle(UNITY_UI_ALPHACLIP)] _UseUIAlphaClip("Use Alpha Clip", Float) = 0
}
SubShader
{
Tags
{
"Queue" = "Transparent"
"IgnoreProjector" = "True"
"RenderType" = "Transparent"
"PreviewType" = "Plane"
"CanUseSpriteAtlas" = "True"
}
Stencil
{
Ref[_Stencil]
Comp[_StencilComp]
Pass[_StencilOp]
ReadMask[_StencilReadMask]
WriteMask[_StencilWriteMask]
}
Cull Off
Lighting Off
ZWrite Off
ZTest[unity_GUIZTestMode]
Blend SrcAlpha OneMinusSrcAlpha
ColorMask[_ColorMask]
Pass
{
Name "Default"
CGPROGRAM
#pragma vertex vert
#pragma fragment frag
#pragma target 2.0
#include "UnityCG.cginc"
#include "UnityUI.cginc"
#pragma multi_compile_local _ UNITY_UI_CLIP_RECT
#pragma multi_compile_local _ UNITY_UI_ALPHACLIP
struct appdata_t
{
float4 vertex : POSITION;
float4 color : COLOR;
float2 texcoord : TEXCOORD0;
UNITY_VERTEX_INPUT_INSTANCE_ID
};
struct v2f
{
float4 vertex : SV_POSITION;
fixed4 color : COLOR;
float2 texcoord : TEXCOORD0;
float4 worldPosition : TEXCOORD1;
UNITY_VERTEX_OUTPUT_STEREO
};
sampler2D _MainTex;
fixed4 _Color;
fixed4 _TextureSampleAdd;
float4 _ClipRect;
float4 _MainTex_ST;
v2f vert(appdata_t v)
{
v2f OUT;
UNITY_SETUP_INSTANCE_ID(v);
UNITY_INITIALIZE_VERTEX_OUTPUT_STEREO(OUT);
OUT.worldPosition = v.vertex;
OUT.vertex = UnityObjectToClipPos(OUT.worldPosition);
OUT.texcoord = TRANSFORM_TEX(v.texcoord, _MainTex);
OUT.color = v.color * _Color;
return OUT;
}
fixed4 frag(v2f IN) : SV_Target
{
half4 color = (tex2D(_MainTex, IN.texcoord) + _TextureSampleAdd) * IN.color + _Color;
color.a = tex2D(_MainTex, IN.texcoord).a;
color.a *= IN.color.a;
return color;
}
ENDCG
}
}
}
\ No newline at end of file
fileFormatVersion: 2
guid: a265900f697959f42b1f2ad4a17da051
ShaderImporter:
externalObjects: {}
defaultTextures: []
nonModifiableTextures: []
preprocessorOverride: 0
userData:
assetBundleName:
assetBundleVariant:
AssetOrigin:
serializedVersion: 1
productId: 225607
packageName: Easy Transitions
packageVersion: 1.4
assetPath: Assets/EasyTransitions/Shaders/AdditiveColor.shader
uploadId: 587727
Shader "UI/MultiplyColor" {
Properties
{
[PerRendererData] _MainTex("Sprite Texture", 2D) = "white" {}
_Color("Tint", Color) = (1,1,1,1)
_StencilComp("Stencil Comparison", Float) = 8
_Stencil("Stencil ID", Float) = 0
_StencilOp("Stencil Operation", Float) = 0
_StencilWriteMask("Stencil Write Mask", Float) = 255
_StencilReadMask("Stencil Read Mask", Float) = 255
_ColorMask("Color Mask", Float) = 15
[Toggle(UNITY_UI_ALPHACLIP)] _UseUIAlphaClip("Use Alpha Clip", Float) = 0
}
SubShader
{
Tags
{
"Queue" = "Transparent"
"IgnoreProjector" = "True"
"RenderType" = "Transparent"
"PreviewType" = "Plane"
"CanUseSpriteAtlas" = "True"
}
Stencil
{
Ref[_Stencil]
Comp[_StencilComp]
Pass[_StencilOp]
ReadMask[_StencilReadMask]
WriteMask[_StencilWriteMask]
}
Cull Off
Lighting Off
ZWrite Off
ZTest[unity_GUIZTestMode]
Blend SrcAlpha OneMinusSrcAlpha
ColorMask[_ColorMask]
Pass
{
Name "Default"
CGPROGRAM
#pragma vertex vert
#pragma fragment frag
#pragma target 2.0
#include "UnityCG.cginc"
#include "UnityUI.cginc"
#pragma multi_compile_local _ UNITY_UI_CLIP_RECT
#pragma multi_compile_local _ UNITY_UI_ALPHACLIP
struct appdata_t
{
float4 vertex : POSITION;
float4 color : COLOR;
float2 texcoord : TEXCOORD0;
UNITY_VERTEX_INPUT_INSTANCE_ID
};
struct v2f
{
float4 vertex : SV_POSITION;
fixed4 color : COLOR;
float2 texcoord : TEXCOORD0;
float4 worldPosition : TEXCOORD1;
UNITY_VERTEX_OUTPUT_STEREO
};
sampler2D _MainTex;
fixed4 _Color;
fixed4 _TextureSampleAdd;
float4 _ClipRect;
float4 _MainTex_ST;
v2f vert(appdata_t v)
{
v2f OUT;
UNITY_SETUP_INSTANCE_ID(v);
UNITY_INITIALIZE_VERTEX_OUTPUT_STEREO(OUT);
OUT.worldPosition = v.vertex;
OUT.vertex = UnityObjectToClipPos(OUT.worldPosition);
OUT.texcoord = TRANSFORM_TEX(v.texcoord, _MainTex);
OUT.color = v.color * _Color;
return OUT;
}
fixed4 frag(v2f IN) : SV_Target
{
half4 color = (tex2D(_MainTex, IN.texcoord) + _TextureSampleAdd) * IN.color * _Color;
color.a = tex2D(_MainTex, IN.texcoord).a;
color.a *= IN.color.a;
return color;
}
ENDCG
}
}
}
\ No newline at end of file
fileFormatVersion: 2
guid: 9a7ce419795e1d243bc4361b47c42a66
ShaderImporter:
externalObjects: {}
defaultTextures: []
nonModifiableTextures: []
preprocessorOverride: 0
userData:
assetBundleName:
assetBundleVariant:
AssetOrigin:
serializedVersion: 1
productId: 225607
packageName: Easy Transitions
packageVersion: 1.4
assetPath: Assets/EasyTransitions/Shaders/MultiplyColor.shader
uploadId: 587727
fileFormatVersion: 2
guid: 2d8170f17790cff4f9b26737ffd3537e
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:
fileFormatVersion: 2
guid: eeeb98c0445060a44895c2b15fa2d04d
TextureImporter:
internalIDToNameTable: []
externalObjects: {}
serializedVersion: 11
mipmaps:
mipMapMode: 0
enableMipMap: 0
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
isReadable: 0
streamingMipmaps: 0
streamingMipmapsPriority: 0
vTOnly: 0
grayScaleToAlpha: 0
generateCubemap: 6
cubemapConvolution: 0
seamlessCubemap: 0
textureFormat: 1
maxTextureSize: 2048
textureSettings:
serializedVersion: 2
filterMode: 1
aniso: 1
mipBias: 0
wrapU: 1
wrapV: 1
wrapW: 1
nPOTScale: 0
lightmap: 0
compressionQuality: 50
spriteMode: 1
spriteExtrude: 1
spriteMeshType: 0
alignment: 0
spritePivot: {x: 0.5, y: 0.5}
spritePixelsToUnits: 500
spriteBorder: {x: 0, y: 0, z: 0, w: 0}
spriteGenerateFallbackPhysicsShape: 1
alphaUsage: 1
alphaIsTransparency: 1
spriteTessellationDetail: -1
textureType: 8
textureShape: 1
singleChannelComponent: 0
flipbookRows: 1
flipbookColumns: 1
maxTextureSizeSet: 0
compressionQualitySet: 0
textureFormatSet: 0
ignorePngGamma: 0
applyGammaDecoding: 0
platformSettings:
- serializedVersion: 3
buildTarget: DefaultTexturePlatform
maxTextureSize: 512
resizeAlgorithm: 0
textureFormat: -1
textureCompression: 0
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
androidETC2FallbackOverride: 0
forceMaximumCompressionQuality_BC6H_BC7: 0
- serializedVersion: 3
buildTarget: Standalone
maxTextureSize: 512
resizeAlgorithm: 0
textureFormat: -1
textureCompression: 0
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
androidETC2FallbackOverride: 0
forceMaximumCompressionQuality_BC6H_BC7: 0
- serializedVersion: 3
buildTarget: WebGL
maxTextureSize: 512
resizeAlgorithm: 0
textureFormat: -1
textureCompression: 0
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
androidETC2FallbackOverride: 0
forceMaximumCompressionQuality_BC6H_BC7: 0
spriteSheet:
serializedVersion: 2
sprites: []
outline: []
physicsShape: []
bones: []
spriteID: 5e97eb03825dee720800000000000000
internalID: 0
vertices: []
indices:
edges: []
weights: []
secondaryTextures: []
spritePackingTag:
pSDRemoveMatte: 0
pSDShowRemoveMatteOption: 0
userData:
assetBundleName:
assetBundleVariant:
AssetOrigin:
serializedVersion: 1
productId: 225607
packageName: Easy Transitions
packageVersion: 1.4
assetPath: Assets/EasyTransitions/Sprites/SettingsIcon.png
uploadId: 587727
fileFormatVersion: 2
guid: 8142b3efe82b5904397d3e29ec3e5a1e
TextureImporter:
internalIDToNameTable: []
externalObjects: {}
serializedVersion: 11
mipmaps:
mipMapMode: 0
enableMipMap: 0
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
isReadable: 0
streamingMipmaps: 0
streamingMipmapsPriority: 0
vTOnly: 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: 0
lightmap: 0
compressionQuality: 50
spriteMode: 1
spriteExtrude: 1
spriteMeshType: 1
alignment: 0
spritePivot: {x: 0.5, y: 0.5}
spritePixelsToUnits: 500
spriteBorder: {x: 250, y: 250, z: 250, w: 250}
spriteGenerateFallbackPhysicsShape: 1
alphaUsage: 1
alphaIsTransparency: 1
spriteTessellationDetail: -1
textureType: 8
textureShape: 1
singleChannelComponent: 0
flipbookRows: 1
flipbookColumns: 1
maxTextureSizeSet: 0
compressionQualitySet: 0
textureFormatSet: 0
ignorePngGamma: 0
applyGammaDecoding: 0
platformSettings:
- serializedVersion: 3
buildTarget: DefaultTexturePlatform
maxTextureSize: 512
resizeAlgorithm: 0
textureFormat: -1
textureCompression: 0
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
androidETC2FallbackOverride: 0
forceMaximumCompressionQuality_BC6H_BC7: 0
- serializedVersion: 3
buildTarget: Standalone
maxTextureSize: 512
resizeAlgorithm: 0
textureFormat: -1
textureCompression: 0
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
androidETC2FallbackOverride: 0
forceMaximumCompressionQuality_BC6H_BC7: 0
- serializedVersion: 3
buildTarget: WebGL
maxTextureSize: 512
resizeAlgorithm: 0
textureFormat: -1
textureCompression: 0
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
androidETC2FallbackOverride: 0
forceMaximumCompressionQuality_BC6H_BC7: 0
spriteSheet:
serializedVersion: 2
sprites: []
outline: []
physicsShape: []
bones: []
spriteID: 5e97eb03825dee720800000000000000
internalID: 0
vertices: []
indices:
edges: []
weights: []
secondaryTextures: []
spritePackingTag:
pSDRemoveMatte: 0
pSDShowRemoveMatteOption: 0
userData:
assetBundleName:
assetBundleVariant:
AssetOrigin:
serializedVersion: 1
productId: 225607
packageName: Easy Transitions
packageVersion: 1.4
assetPath: Assets/EasyTransitions/Sprites/SlicedCircle.png
uploadId: 587727
fileFormatVersion: 2
guid: 61f52773f4cf46747a96e6bcab7498ba
TextureImporter:
internalIDToNameTable: []
externalObjects: {}
serializedVersion: 11
mipmaps:
mipMapMode: 0
enableMipMap: 0
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
isReadable: 0
streamingMipmaps: 0
streamingMipmapsPriority: 0
vTOnly: 0
grayScaleToAlpha: 0
generateCubemap: 6
cubemapConvolution: 0
seamlessCubemap: 0
textureFormat: 1
maxTextureSize: 2048
textureSettings:
serializedVersion: 2
filterMode: 1
aniso: 1
mipBias: 0
wrapU: 1
wrapV: 1
wrapW: 1
nPOTScale: 0
lightmap: 0
compressionQuality: 50
spriteMode: 1
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: 1
spriteTessellationDetail: -1
textureType: 8
textureShape: 1
singleChannelComponent: 0
flipbookRows: 1
flipbookColumns: 1
maxTextureSizeSet: 0
compressionQualitySet: 0
textureFormatSet: 0
ignorePngGamma: 0
applyGammaDecoding: 0
platformSettings:
- serializedVersion: 3
buildTarget: DefaultTexturePlatform
maxTextureSize: 1024
resizeAlgorithm: 0
textureFormat: -1
textureCompression: 3
compressionQuality: 50
crunchedCompression: 1
allowsAlphaSplitting: 0
overridden: 0
androidETC2FallbackOverride: 0
forceMaximumCompressionQuality_BC6H_BC7: 0
- serializedVersion: 3
buildTarget: Standalone
maxTextureSize: 1024
resizeAlgorithm: 0
textureFormat: -1
textureCompression: 3
compressionQuality: 50
crunchedCompression: 1
allowsAlphaSplitting: 0
overridden: 0
androidETC2FallbackOverride: 0
forceMaximumCompressionQuality_BC6H_BC7: 0
spriteSheet:
serializedVersion: 2
sprites: []
outline: []
physicsShape: []
bones: []
spriteID: 5e97eb03825dee720800000000000000
internalID: 0
vertices: []
indices:
edges: []
weights: []
secondaryTextures: []
spritePackingTag:
pSDRemoveMatte: 0
pSDShowRemoveMatteOption: 0
userData:
assetBundleName:
assetBundleVariant:
AssetOrigin:
serializedVersion: 1
productId: 225607
packageName: Easy Transitions
packageVersion: 1.4
assetPath: Assets/EasyTransitions/Sprites/TransitionDemoLogo.png
uploadId: 587727
fileFormatVersion: 2
guid: e60853cfffc760a4f899906440a6a3cf
TextureImporter:
internalIDToNameTable: []
externalObjects: {}
serializedVersion: 11
mipmaps:
mipMapMode: 0
enableMipMap: 0
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
isReadable: 0
streamingMipmaps: 0
streamingMipmapsPriority: 0
vTOnly: 0
grayScaleToAlpha: 0
generateCubemap: 6
cubemapConvolution: 0
seamlessCubemap: 0
textureFormat: 1
maxTextureSize: 2048
textureSettings:
serializedVersion: 2
filterMode: 1
aniso: 1
mipBias: 0
wrapU: 1
wrapV: 1
wrapW: 1
nPOTScale: 0
lightmap: 0
compressionQuality: 50
spriteMode: 1
spriteExtrude: 1
spriteMeshType: 0
alignment: 0
spritePivot: {x: 0.5, y: 0.5}
spritePixelsToUnits: 500
spriteBorder: {x: 0, y: 0, z: 0, w: 0}
spriteGenerateFallbackPhysicsShape: 1
alphaUsage: 1
alphaIsTransparency: 1
spriteTessellationDetail: -1
textureType: 8
textureShape: 1
singleChannelComponent: 0
flipbookRows: 1
flipbookColumns: 1
maxTextureSizeSet: 0
compressionQualitySet: 0
textureFormatSet: 0
ignorePngGamma: 0
applyGammaDecoding: 0
platformSettings:
- serializedVersion: 3
buildTarget: DefaultTexturePlatform
maxTextureSize: 512
resizeAlgorithm: 0
textureFormat: -1
textureCompression: 0
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
androidETC2FallbackOverride: 0
forceMaximumCompressionQuality_BC6H_BC7: 0
- serializedVersion: 3
buildTarget: Standalone
maxTextureSize: 512
resizeAlgorithm: 0
textureFormat: -1
textureCompression: 0
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
androidETC2FallbackOverride: 0
forceMaximumCompressionQuality_BC6H_BC7: 0
- serializedVersion: 3
buildTarget: WebGL
maxTextureSize: 512
resizeAlgorithm: 0
textureFormat: -1
textureCompression: 0
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
androidETC2FallbackOverride: 0
forceMaximumCompressionQuality_BC6H_BC7: 0
spriteSheet:
serializedVersion: 2
sprites: []
outline: []
physicsShape: []
bones: []
spriteID: 5e97eb03825dee720800000000000000
internalID: 0
vertices: []
indices:
edges: []
weights: []
secondaryTextures: []
spritePackingTag:
pSDRemoveMatte: 0
pSDShowRemoveMatteOption: 0
userData:
assetBundleName:
assetBundleVariant:
AssetOrigin:
serializedVersion: 1
productId: 225607
packageName: Easy Transitions
packageVersion: 1.4
assetPath: Assets/EasyTransitions/Sprites/TransitionIcon.png
uploadId: 587727
fileFormatVersion: 2
guid: 35869fd26108add4d8b2fe1a0a6b8009
TextureImporter:
internalIDToNameTable: []
externalObjects: {}
serializedVersion: 11
mipmaps:
mipMapMode: 0
enableMipMap: 0
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
isReadable: 0
streamingMipmaps: 0
streamingMipmapsPriority: 0
vTOnly: 0
grayScaleToAlpha: 0
generateCubemap: 6
cubemapConvolution: 0
seamlessCubemap: 0
textureFormat: 1
maxTextureSize: 2048
textureSettings:
serializedVersion: 2
filterMode: 1
aniso: 1
mipBias: 0
wrapU: 1
wrapV: 1
wrapW: 1
nPOTScale: 0
lightmap: 0
compressionQuality: 50
spriteMode: 1
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: 1
spriteTessellationDetail: -1
textureType: 8
textureShape: 1
singleChannelComponent: 0
flipbookRows: 1
flipbookColumns: 1
maxTextureSizeSet: 0
compressionQualitySet: 0
textureFormatSet: 0
ignorePngGamma: 0
applyGammaDecoding: 0
platformSettings:
- serializedVersion: 3
buildTarget: DefaultTexturePlatform
maxTextureSize: 512
resizeAlgorithm: 0
textureFormat: -1
textureCompression: 0
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
androidETC2FallbackOverride: 0
forceMaximumCompressionQuality_BC6H_BC7: 0
- serializedVersion: 3
buildTarget: Standalone
maxTextureSize: 512
resizeAlgorithm: 0
textureFormat: -1
textureCompression: 0
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
androidETC2FallbackOverride: 0
forceMaximumCompressionQuality_BC6H_BC7: 0
spriteSheet:
serializedVersion: 2
sprites: []
outline: []
physicsShape: []
bones: []
spriteID: 5e97eb03825dee720800000000000000
internalID: 0
vertices: []
indices:
edges: []
weights: []
secondaryTextures: []
spritePackingTag:
pSDRemoveMatte: 0
pSDShowRemoveMatteOption: 0
userData:
assetBundleName:
assetBundleVariant:
AssetOrigin:
serializedVersion: 1
productId: 225607
packageName: Easy Transitions
packageVersion: 1.4
assetPath: Assets/EasyTransitions/Sprites/TransitionManagerSettingsLogo.png
uploadId: 587727
fileFormatVersion: 2
guid: 0a9be0e727574c34d9695b80b72cd877
TextureImporter:
internalIDToNameTable: []
externalObjects: {}
serializedVersion: 11
mipmaps:
mipMapMode: 0
enableMipMap: 0
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
isReadable: 0
streamingMipmaps: 0
streamingMipmapsPriority: 0
vTOnly: 0
grayScaleToAlpha: 0
generateCubemap: 6
cubemapConvolution: 0
seamlessCubemap: 0
textureFormat: 1
maxTextureSize: 2048
textureSettings:
serializedVersion: 2
filterMode: 1
aniso: 1
mipBias: 0
wrapU: 1
wrapV: 1
wrapW: 1
nPOTScale: 0
lightmap: 0
compressionQuality: 50
spriteMode: 1
spriteExtrude: 1
spriteMeshType: 0
alignment: 0
spritePivot: {x: 0.5, y: 0.5}
spritePixelsToUnits: 500
spriteBorder: {x: 0, y: 0, z: 0, w: 0}
spriteGenerateFallbackPhysicsShape: 1
alphaUsage: 1
alphaIsTransparency: 1
spriteTessellationDetail: -1
textureType: 8
textureShape: 1
singleChannelComponent: 0
flipbookRows: 1
flipbookColumns: 1
maxTextureSizeSet: 0
compressionQualitySet: 0
textureFormatSet: 0
ignorePngGamma: 0
applyGammaDecoding: 0
platformSettings:
- serializedVersion: 3
buildTarget: DefaultTexturePlatform
maxTextureSize: 512
resizeAlgorithm: 0
textureFormat: -1
textureCompression: 0
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
androidETC2FallbackOverride: 0
forceMaximumCompressionQuality_BC6H_BC7: 0
- serializedVersion: 3
buildTarget: Standalone
maxTextureSize: 512
resizeAlgorithm: 0
textureFormat: -1
textureCompression: 0
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
androidETC2FallbackOverride: 0
forceMaximumCompressionQuality_BC6H_BC7: 0
spriteSheet:
serializedVersion: 2
sprites: []
outline: []
physicsShape: []
bones: []
spriteID: 5e97eb03825dee720800000000000000
internalID: 0
vertices: []
indices:
edges: []
weights: []
secondaryTextures: []
spritePackingTag:
pSDRemoveMatte: 0
pSDShowRemoveMatteOption: 0
userData:
assetBundleName:
assetBundleVariant:
AssetOrigin:
serializedVersion: 1
productId: 225607
packageName: Easy Transitions
packageVersion: 1.4
assetPath: Assets/EasyTransitions/Sprites/TransitionPrefabIcon.png
uploadId: 587727
fileFormatVersion: 2
guid: 09cfdc466dfaf6c4e8018ec998d37f5f
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:
fileFormatVersion: 2
guid: 3b945b0a3a62e104293a65370101aff0
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!114 &11400000
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 0}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: bd0208933b0e3a443a9c1b5975c0fcb7, type: 3}
m_Name: Brush
m_EditorClassIdentifier:
multiplyColorMaterial: {fileID: 2100000, guid: 53171468e32441749b007c64337cd3db, type: 2}
addColorMaterial: {fileID: 2100000, guid: 65ccb7b6cbefce14eb6f884cfc33ba91, type: 2}
refrenceResolution: {x: 1920, y: 1080}
blockRaycasts: 1
colorTintMode: 0
colorTint: {r: 1, g: 1, b: 1, a: 1}
isCutoutTransition: 0
transitionSpeed: 1
autoAdjustTransitionTime: 1
flipX: 0
flipY: 0
transitionTime: 1
destroyTime: 1.25
transitionIn: {fileID: 8146198696072019079, guid: ba56f51867b074f42acabcd86ba13273, type: 3}
transitionOut: {fileID: 1971740581942834528, guid: 7169acee88d38d5418744538f27d012b, type: 3}
fileFormatVersion: 2
guid: b577ec7af0d48c34a9d31ce17f830a8d
NativeFormatImporter:
externalObjects: {}
mainObjectFileID: 11400000
userData:
assetBundleName:
assetBundleVariant:
AssetOrigin:
serializedVersion: 1
productId: 225607
packageName: Easy Transitions
packageVersion: 1.4
assetPath: Assets/EasyTransitions/Transitions/Brush/Brush.asset
uploadId: 587727
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!91 &9100000
AnimatorController:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_Name: BrushIN
serializedVersion: 5
m_AnimatorParameters: []
m_AnimatorLayers:
- serializedVersion: 5
m_Name: Base Layer
m_StateMachine: {fileID: 1888912226125713477}
m_Mask: {fileID: 0}
m_Motions: []
m_Behaviours: []
m_BlendingMode: 0
m_SyncedLayerIndex: -1
m_DefaultWeight: 0
m_IKPass: 0
m_SyncedLayerAffectsTiming: 0
m_Controller: {fileID: 9100000}
--- !u!1107 &1888912226125713477
AnimatorStateMachine:
serializedVersion: 6
m_ObjectHideFlags: 1
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_Name: Base Layer
m_ChildStates:
- serializedVersion: 1
m_State: {fileID: 5890560578795519125}
m_Position: {x: 200, y: 0, z: 0}
m_ChildStateMachines: []
m_AnyStateTransitions: []
m_EntryTransitions: []
m_StateMachineTransitions: {}
m_StateMachineBehaviours: []
m_AnyStatePosition: {x: 50, y: 20, z: 0}
m_EntryPosition: {x: 50, y: 120, z: 0}
m_ExitPosition: {x: 800, y: 120, z: 0}
m_ParentStateMachinePosition: {x: 800, y: 20, z: 0}
m_DefaultState: {fileID: 5890560578795519125}
--- !u!1102 &5890560578795519125
AnimatorState:
serializedVersion: 6
m_ObjectHideFlags: 1
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_Name: BrushIn
m_Speed: 1
m_CycleOffset: 0
m_Transitions: []
m_StateMachineBehaviours: []
m_Position: {x: 50, y: 50, z: 0}
m_IKOnFeet: 0
m_WriteDefaultValues: 1
m_Mirror: 0
m_SpeedParameterActive: 0
m_MirrorParameterActive: 0
m_CycleOffsetParameterActive: 0
m_TimeParameterActive: 0
m_Motion: {fileID: 7400000, guid: eb30e248cc61803499d09902ac591714, type: 2}
m_Tag:
m_SpeedParameter:
m_MirrorParameter:
m_CycleOffsetParameter:
m_TimeParameter:
fileFormatVersion: 2
guid: 71e7931952c24894d966e0eeb094d7d5
NativeFormatImporter:
externalObjects: {}
mainObjectFileID: 9100000
userData:
assetBundleName:
assetBundleVariant:
AssetOrigin:
serializedVersion: 1
productId: 225607
packageName: Easy Transitions
packageVersion: 1.4
assetPath: Assets/EasyTransitions/Transitions/Brush/BrushIN.controller
uploadId: 587727
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!1 &8146198696072019079
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 9073943535538272471}
- component: {fileID: 6475419151159999820}
- component: {fileID: 8146198696072019081}
- component: {fileID: 8146198696072019078}
m_Layer: 5
m_Name: BrushIN
m_TagString: Untagged
m_Icon: {fileID: 2800000, guid: 0a9be0e727574c34d9695b80b72cd877, type: 3}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!224 &9073943535538272471
RectTransform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 8146198696072019079}
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_Children: []
m_Father: {fileID: 0}
m_RootOrder: 0
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0, y: 0}
m_AnchorMax: {x: 1, y: 1}
m_AnchoredPosition: {x: 0, y: 0}
m_SizeDelta: {x: 0, y: 0}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!222 &6475419151159999820
CanvasRenderer:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 8146198696072019079}
m_CullTransparentMesh: 1
--- !u!95 &8146198696072019081
Animator:
serializedVersion: 3
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 8146198696072019079}
m_Enabled: 1
m_Avatar: {fileID: 0}
m_Controller: {fileID: 9100000, guid: 71e7931952c24894d966e0eeb094d7d5, type: 2}
m_CullingMode: 0
m_UpdateMode: 0
m_ApplyRootMotion: 0
m_LinearVelocityBlending: 0
m_WarningMessage:
m_HasTransformHierarchy: 1
m_AllowConstantClipSamplingOptimization: 1
m_KeepAnimatorControllerStateOnDisable: 0
--- !u!114 &8146198696072019078
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 8146198696072019079}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: fe87c0e1cc204ed48ad3b37840f39efc, type: 3}
m_Name:
m_EditorClassIdentifier:
m_Material: {fileID: 0}
m_Color: {r: 0, g: 0, b: 0, a: 0}
m_RaycastTarget: 1
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
fileFormatVersion: 2
guid: ba56f51867b074f42acabcd86ba13273
PrefabImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:
AssetOrigin:
serializedVersion: 1
productId: 225607
packageName: Easy Transitions
packageVersion: 1.4
assetPath: Assets/EasyTransitions/Transitions/Brush/BrushIN.prefab
uploadId: 587727
fileFormatVersion: 2
guid: eb30e248cc61803499d09902ac591714
NativeFormatImporter:
externalObjects: {}
mainObjectFileID: 7400000
userData:
assetBundleName:
assetBundleVariant:
AssetOrigin:
serializedVersion: 1
productId: 225607
packageName: Easy Transitions
packageVersion: 1.4
assetPath: Assets/EasyTransitions/Transitions/Brush/BrushIn.anim
uploadId: 587727
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!1107 &-5546280349970384836
AnimatorStateMachine:
serializedVersion: 6
m_ObjectHideFlags: 1
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_Name: Base Layer
m_ChildStates:
- serializedVersion: 1
m_State: {fileID: -1896324803682650919}
m_Position: {x: 200, y: 0, z: 0}
m_ChildStateMachines: []
m_AnyStateTransitions: []
m_EntryTransitions: []
m_StateMachineTransitions: {}
m_StateMachineBehaviours: []
m_AnyStatePosition: {x: 50, y: 20, z: 0}
m_EntryPosition: {x: 50, y: 120, z: 0}
m_ExitPosition: {x: 800, y: 120, z: 0}
m_ParentStateMachinePosition: {x: 800, y: 20, z: 0}
m_DefaultState: {fileID: -1896324803682650919}
--- !u!1102 &-1896324803682650919
AnimatorState:
serializedVersion: 6
m_ObjectHideFlags: 1
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_Name: BrushOut
m_Speed: 1
m_CycleOffset: 0
m_Transitions: []
m_StateMachineBehaviours: []
m_Position: {x: 50, y: 50, z: 0}
m_IKOnFeet: 0
m_WriteDefaultValues: 1
m_Mirror: 0
m_SpeedParameterActive: 0
m_MirrorParameterActive: 0
m_CycleOffsetParameterActive: 0
m_TimeParameterActive: 0
m_Motion: {fileID: 7400000, guid: 67d2a80422bcd2648a2c6a1e9820ad6f, type: 2}
m_Tag:
m_SpeedParameter:
m_MirrorParameter:
m_CycleOffsetParameter:
m_TimeParameter:
--- !u!91 &9100000
AnimatorController:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_Name: BrushOUT
serializedVersion: 5
m_AnimatorParameters: []
m_AnimatorLayers:
- serializedVersion: 5
m_Name: Base Layer
m_StateMachine: {fileID: -5546280349970384836}
m_Mask: {fileID: 0}
m_Motions: []
m_Behaviours: []
m_BlendingMode: 0
m_SyncedLayerIndex: -1
m_DefaultWeight: 0
m_IKPass: 0
m_SyncedLayerAffectsTiming: 0
m_Controller: {fileID: 9100000}
fileFormatVersion: 2
guid: c28b14e703b79bf499f8151b6752aeb2
NativeFormatImporter:
externalObjects: {}
mainObjectFileID: 9100000
userData:
assetBundleName:
assetBundleVariant:
AssetOrigin:
serializedVersion: 1
productId: 225607
packageName: Easy Transitions
packageVersion: 1.4
assetPath: Assets/EasyTransitions/Transitions/Brush/BrushOUT.controller
uploadId: 587727
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!1 &1971740581942834528
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 1710528384112931120}
- component: {fileID: 3714718148840453291}
- component: {fileID: 1971740581942834542}
- component: {fileID: 1971740581942834529}
m_Layer: 5
m_Name: BrushOUT
m_TagString: Untagged
m_Icon: {fileID: 2800000, guid: 0a9be0e727574c34d9695b80b72cd877, type: 3}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!224 &1710528384112931120
RectTransform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1971740581942834528}
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_Children: []
m_Father: {fileID: 0}
m_RootOrder: 0
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0, y: 0}
m_AnchorMax: {x: 1, y: 1}
m_AnchoredPosition: {x: 0, y: 0}
m_SizeDelta: {x: 0, y: 0}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!222 &3714718148840453291
CanvasRenderer:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1971740581942834528}
m_CullTransparentMesh: 1
--- !u!95 &1971740581942834542
Animator:
serializedVersion: 3
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1971740581942834528}
m_Enabled: 1
m_Avatar: {fileID: 0}
m_Controller: {fileID: 9100000, guid: c28b14e703b79bf499f8151b6752aeb2, type: 2}
m_CullingMode: 0
m_UpdateMode: 0
m_ApplyRootMotion: 0
m_LinearVelocityBlending: 0
m_WarningMessage:
m_HasTransformHierarchy: 1
m_AllowConstantClipSamplingOptimization: 1
m_KeepAnimatorControllerStateOnDisable: 0
--- !u!114 &1971740581942834529
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1971740581942834528}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: fe87c0e1cc204ed48ad3b37840f39efc, type: 3}
m_Name:
m_EditorClassIdentifier:
m_Material: {fileID: 0}
m_Color: {r: 0, g: 0, b: 0, a: 1}
m_RaycastTarget: 1
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
fileFormatVersion: 2
guid: 7169acee88d38d5418744538f27d012b
PrefabImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:
AssetOrigin:
serializedVersion: 1
productId: 225607
packageName: Easy Transitions
packageVersion: 1.4
assetPath: Assets/EasyTransitions/Transitions/Brush/BrushOUT.prefab
uploadId: 587727
fileFormatVersion: 2
guid: f2b440df11fbfcf4dbda00121f77bc6b
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
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