Initial Commit

This commit is contained in:
Sebastian Cabrera 2021-08-02 05:44:37 -04:00
parent 53eb92e9af
commit 270ab7d11f
15341 changed files with 700234 additions and 0 deletions

View file

@ -0,0 +1,46 @@
#if UNITY_EDITOR && UNITY_2021_1_OR_NEWER
#define CAN_USE_CUSTOM_HELP_URL
#endif
using System;
using System.Diagnostics;
using UnityEngine;
namespace UnityEngine.Timeline
{
#if CAN_USE_CUSTOM_HELP_URL
using UnityEditor.PackageManager;
[Conditional("UNITY_EDITOR")]
class TimelineHelpURLAttribute : HelpURLAttribute
{
const string k_BaseURL = "https://docs.unity3d.com/Packages/com.unity.timeline@";
const string k_MidURL = "/api/";
const string k_EndURL = ".html";
const string k_FallbackVersion = "latest";
static readonly string k_PackageVersion;
static TimelineHelpURLAttribute()
{
PackageInfo packageInfo = PackageInfo.FindForAssembly(typeof(TimelineAsset).Assembly);
k_PackageVersion = packageInfo == null ? k_FallbackVersion : packageInfo.version.Substring(0, 3);
}
public TimelineHelpURLAttribute(Type type)
: base(HelpURL(type)) {}
static string HelpURL(Type type)
{
return $"{k_BaseURL}{k_PackageVersion}{k_MidURL}{type.FullName}{k_EndURL}";
}
}
#else //HelpURL attribute is `sealed` in previous Unity versions
[Conditional("UNITY_EDITOR")]
class TimelineHelpURLAttribute : Attribute
{
public TimelineHelpURLAttribute(Type type) {}
}
#endif
}

View file

@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: c35b6ea5f1d7cd74eac79413eb70670c
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View file

@ -0,0 +1,33 @@
using System;
using UnityEngine;
namespace UnityEngine.Timeline
{
/// <summary>
/// Attribute used to specify the color of the track and its clips inside the Timeline Editor.
/// </summary>
[AttributeUsage(AttributeTargets.Class)]
public class TrackColorAttribute : Attribute
{
Color m_Color;
/// <summary>
///
/// </summary>
public Color color
{
get { return m_Color; }
}
/// <summary>
/// Specify the track color using [0-1] R,G,B values.
/// </summary>
/// <param name="r">Red value [0-1].</param>
/// <param name="g">Green value [0-1].</param>
/// <param name="b">Blue value [0-1].</param>
public TrackColorAttribute(float r, float g, float b)
{
m_Color = new Color(r, g, b);
}
}
}

View file

@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: 6c3d52cc5c46d7946a920e21901ff38e
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant: