Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
摸鱼小分队
Unity 粒子特效方案:竹铃芝
提交
2fa30b55
Unity 粒子特效方案:竹铃芝
项目概览
摸鱼小分队
/
Unity 粒子特效方案:竹铃芝
通知
0
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
Unity 粒子特效方案:竹铃芝
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
前往新版Gitcode,体验更适合开发者的 AI 搜索 >>
提交
2fa30b55
编写于
4月 19, 2023
作者:
魔术师Dix
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
更新专用粒子特效数据结构;
上级
128b0d54
变更
9
隐藏空白更改
内联
并排
Showing
9 changed file
with
220 addition
and
4 deletion
+220
-4
Assets/TouchFish.Omphalia/Core.meta
Assets/TouchFish.Omphalia/Core.meta
+8
-0
Assets/TouchFish.Omphalia/Core/OmphaliaParticle.cs
Assets/TouchFish.Omphalia/Core/OmphaliaParticle.cs
+39
-0
Assets/TouchFish.Omphalia/Core/OmphaliaParticle.cs.meta
Assets/TouchFish.Omphalia/Core/OmphaliaParticle.cs.meta
+11
-0
Assets/TouchFish.Omphalia/Core/OmphaliaUtils.cs
Assets/TouchFish.Omphalia/Core/OmphaliaUtils.cs
+37
-0
Assets/TouchFish.Omphalia/Core/OmphaliaUtils.cs.meta
Assets/TouchFish.Omphalia/Core/OmphaliaUtils.cs.meta
+11
-0
Assets/TouchFish.Omphalia/Core/ParticleConfig.cs
Assets/TouchFish.Omphalia/Core/ParticleConfig.cs
+93
-0
Assets/TouchFish.Omphalia/Core/ParticleConfig.cs.meta
Assets/TouchFish.Omphalia/Core/ParticleConfig.cs.meta
+11
-0
ProjectSettings/EditorBuildSettings.asset
ProjectSettings/EditorBuildSettings.asset
+4
-1
ProjectSettings/ProjectSettings.asset
ProjectSettings/ProjectSettings.asset
+6
-3
未找到文件。
Assets/TouchFish.Omphalia/Core.meta
0 → 100644
浏览文件 @
2fa30b55
fileFormatVersion: 2
guid: 05e7a91a5b215b141b7abebd4e6f57fc
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:
Assets/TouchFish.Omphalia/Core/OmphaliaParticle.cs
0 → 100644
浏览文件 @
2fa30b55
/*
*Copyright(C) 2023 by TouchFinsh All rights reserved.
*Unity版本:2020.3.43f1c1
*作者:Chief
*创建日期: 2023-04-19
*版本: 0.1
*/
using
Unity.Entities
;
using
Unity.Mathematics
;
using
UnityEngine
;
namespace
TouchFish.Omphalia
{
/// <summary>
/// 用于外部可以随意赋值的粒子特效结构体;
/// 与 Unity 原生的 Particle 数据完全相同;
/// </summary>
public
struct
OmphaliaParticle
:
IComponentData
{
public
float3
Position
;
public
float3
Velocity
;
public
float3
AnimatedVelocity
;
public
float3
InitialVelocity
;
public
float3
AxisOfRotation
;
public
float3
Rotation
;
public
float3
AngularVelocity
;
public
float3
StartSize
;
public
Color32
StartColor
;
public
uint
RandomSeed
;
public
uint
ParentRandomSeed
;
public
float
Lifetime
;
public
float
StartLifetime
;
public
int
MeshIndex
;
public
float
EmitAccumulator0
;
public
float
EmitAccumulator1
;
public
uint
Flags
;
}
}
Assets/TouchFish.Omphalia/Core/OmphaliaParticle.cs.meta
0 → 100644
浏览文件 @
2fa30b55
fileFormatVersion: 2
guid: 0215c2c7b27af2f4f81a096d54942f1f
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:
Assets/TouchFish.Omphalia/Core/OmphaliaUtils.cs
0 → 100644
浏览文件 @
2fa30b55
/*
*Copyright(C) 2023 by TouchFinsh All rights reserved.
*Unity版本:2020.3.43f1c1
*作者:Chief
*创建日期: 2023-04-19
*版本: 0.1
*/
using
System.Reflection
;
namespace
TouchFish.Omphalia
{
/// <summary>
/// 竹铃芝 粒子特效解决方案通用类
/// </summary>
public
static
class
OmphaliaUtils
{
/// <summary>
/// 通过反射的值获取方式
/// </summary>
/// <typeparam name="T"></typeparam>
/// <param name="instance"></param>
/// <param name="propertyName"></param>
/// <returns></returns>
internal
static
T
GetPropertyValue
<
T
>(
this
object
instance
,
string
propertyName
)
{
if
(
instance
==
null
)
return
default
;
var
mType
=
instance
.
GetType
();
var
property
=
mType
.
GetField
(
propertyName
,
BindingFlags
.
Default
|
BindingFlags
.
NonPublic
|
BindingFlags
.
Public
|
BindingFlags
.
Instance
);
return
(
T
)
property
.
GetValue
(
instance
);
}
}
}
\ No newline at end of file
Assets/TouchFish.Omphalia/Core/OmphaliaUtils.cs.meta
0 → 100644
浏览文件 @
2fa30b55
fileFormatVersion: 2
guid: 15bfa63291871bf45a172ab2e2ac8893
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:
Assets/TouchFish.Omphalia/Core/ParticleConfig.cs
0 → 100644
浏览文件 @
2fa30b55
/*
*Copyright(C) 2023 by TouchFinsh All rights reserved.
*Unity版本:2020.3.43f1c1
*作者:Chief
*创建日期: 2023-04-19
*版本: 0.1
*/
using
System
;
using
UnityEngine
;
using
static
UnityEngine
.
ParticleSystem
;
using
Particle
=
UnityEngine
.
ParticleSystem
.
Particle
;
namespace
TouchFish.Omphalia
{
/// <summary>
/// 粒子特效配置
/// </summary>
[
Serializable
]
public
class
ParticleConfig
{
#
region
反射获取的粒子参数
[
SerializeField
]
private
Vector3
m_Position
;
[
SerializeField
]
private
Vector3
m_Velocity
;
[
SerializeField
]
private
Vector3
m_AnimatedVelocity
;
[
SerializeField
]
private
Vector3
m_InitialVelocity
;
[
SerializeField
]
private
Vector3
m_AxisOfRotation
;
[
SerializeField
]
private
Vector3
m_Rotation
;
[
SerializeField
]
private
Vector3
m_AngularVelocity
;
[
SerializeField
]
private
Vector3
m_StartSize
;
[
SerializeField
]
private
Color32
m_StartColor
;
[
SerializeField
]
private
uint
m_RandomSeed
;
[
SerializeField
]
private
uint
m_ParentRandomSeed
;
[
SerializeField
]
private
float
m_Lifetime
;
[
SerializeField
]
private
float
m_StartLifetime
;
[
SerializeField
]
private
int
m_MeshIndex
;
[
SerializeField
]
private
float
m_EmitAccumulator0
;
[
SerializeField
]
private
float
m_EmitAccumulator1
;
[
SerializeField
]
private
uint
m_Flags
;
public
void
AutoSetValue
(
Particle
particle
)
{
m_Position
=
particle
.
GetPropertyValue
<
Vector3
>(
"m_Position"
);
m_Velocity
=
particle
.
GetPropertyValue
<
Vector3
>(
"m_Velocity"
);
m_AnimatedVelocity
=
particle
.
GetPropertyValue
<
Vector3
>(
"m_AnimatedVelocity"
);
m_InitialVelocity
=
particle
.
GetPropertyValue
<
Vector3
>(
"m_InitialVelocity"
);
m_AxisOfRotation
=
particle
.
GetPropertyValue
<
Vector3
>(
"m_AxisOfRotation"
);
m_Rotation
=
particle
.
GetPropertyValue
<
Vector3
>(
"m_Rotation"
);
m_AngularVelocity
=
particle
.
GetPropertyValue
<
Vector3
>(
"m_AngularVelocity"
);
m_StartSize
=
particle
.
GetPropertyValue
<
Vector3
>(
"m_StartSize"
);
m_StartColor
=
particle
.
GetPropertyValue
<
Color32
>(
"m_StartColor"
);
m_RandomSeed
=
particle
.
GetPropertyValue
<
uint
>(
"m_RandomSeed"
);
m_ParentRandomSeed
=
particle
.
GetPropertyValue
<
uint
>(
"m_ParentRandomSeed"
);
m_Lifetime
=
particle
.
GetPropertyValue
<
float
>(
"m_Lifetime"
);
m_StartLifetime
=
particle
.
GetPropertyValue
<
float
>(
"m_StartLifetime"
);
m_MeshIndex
=
particle
.
GetPropertyValue
<
int
>(
"m_MeshIndex"
);
m_EmitAccumulator0
=
particle
.
GetPropertyValue
<
float
>(
"m_EmitAccumulator0"
);
m_EmitAccumulator1
=
particle
.
GetPropertyValue
<
float
>(
"m_EmitAccumulator1"
);
m_Flags
=
particle
.
GetPropertyValue
<
uint
>(
"m_Flags"
);
}
#
endregion
public
OmphaliaParticle
GetOmphaliaParticle
()
{
OmphaliaParticle
particle
=
new
OmphaliaParticle
()
{
Position
=
m_Position
,
Velocity
=
m_Velocity
,
AnimatedVelocity
=
m_AnimatedVelocity
,
InitialVelocity
=
m_InitialVelocity
,
AxisOfRotation
=
m_AxisOfRotation
,
Rotation
=
m_Rotation
,
AngularVelocity
=
m_AngularVelocity
,
StartSize
=
m_StartSize
,
StartColor
=
m_StartColor
,
RandomSeed
=
m_RandomSeed
,
ParentRandomSeed
=
m_ParentRandomSeed
,
Lifetime
=
m_Lifetime
,
StartLifetime
=
m_StartLifetime
,
MeshIndex
=
m_MeshIndex
,
EmitAccumulator0
=
m_EmitAccumulator0
,
EmitAccumulator1
=
m_EmitAccumulator1
,
Flags
=
m_Flags
,
};
return
particle
;
}
}
}
Assets/TouchFish.Omphalia/Core/ParticleConfig.cs.meta
0 → 100644
浏览文件 @
2fa30b55
fileFormatVersion: 2
guid: a96fcbedf060696468b8b54ea2fd6cbc
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:
ProjectSettings/EditorBuildSettings.asset
浏览文件 @
2fa30b55
...
...
@@ -4,5 +4,8 @@
EditorBuildSettings
:
m_ObjectHideFlags
:
0
serializedVersion
:
2
m_Scenes
:
[]
m_Scenes
:
-
enabled
:
1
path
:
Assets/Scenes/SampleScene.unity
guid
:
9fc0d4010bbf28b4594072e72b8655ab
m_configObjects
:
{}
ProjectSettings/ProjectSettings.asset
浏览文件 @
2fa30b55
...
...
@@ -12,7 +12,7 @@ PlayerSettings:
targetDevice
:
2
useOnDemandResources
:
0
accelerometerFrequency
:
60
companyName
:
DefaultCompany
companyName
:
TouchFinsh
productName
:
Omphalia
defaultCursor
:
{
fileID
:
0
}
cursorHotspot
:
{
x
:
0
,
y
:
0
}
...
...
@@ -164,7 +164,8 @@ PlayerSettings:
resetResolutionOnWindowResize
:
0
androidSupportedAspectRatio
:
1
androidMaxAspectRatio
:
2.1
applicationIdentifier
:
{}
applicationIdentifier
:
Android
:
com.TouchFinsh.Omphalia
buildNumber
:
Standalone
:
0
iPhone
:
0
...
...
@@ -607,9 +608,11 @@ PlayerSettings:
webGLDecompressionFallback
:
0
scriptingDefineSymbols
:
1
:
ODIN_INSPECTOR;ODIN_INSPECTOR_3;ODIN_INSPECTOR_3_1
7
:
ODIN_INSPECTOR;ODIN_INSPECTOR_3;ODIN_INSPECTOR_3_1
additionalCompilerArguments
:
{}
platformArchitecture
:
{}
scriptingBackend
:
{}
scriptingBackend
:
Android
:
1
il2cppCompilerConfiguration
:
{}
managedStrippingLevel
:
{}
incrementalIl2cppBuild
:
{}
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录