Aryan Mann
3 年前
当前提交
5e64cf08
共有 6 个文件被更改,包括 25 次插入 和 83 次删除
-
29com.unity.perception/Runtime/PerceptionAnalytics.cs
-
16com.unity.perception/Runtime/Randomization/Scenarios/ScenarioBase.cs
-
51TestProjects/PerceptionHDRP/Assets/Scenes/AllMembersAndParametersTestRandomizer.cs
-
3TestProjects/PerceptionHDRP/Assets/Scenes/AllMembersAndParametersTestRandomizer.cs.meta
-
8TestProjects/PerceptionHDRP/Assets/Scenes.meta
-
1TestProjects/PerceptionHDRP/randomizerAnalyticsSerializationExample.json
|
|||
using UnityEngine.Perception.Analytics; |
|||
using UnityEngine.Perception.Randomization.Parameters; |
|||
using UnityEngine.Perception.Randomization.Randomizers; |
|||
using UnityEngine.Perception.Randomization.Samplers; |
|||
|
|||
namespace UnityEngine.Perception |
|||
{ |
|||
[AddRandomizerMenu("Test/All Members And Parameters")] |
|||
public class AllMembersAndParametersTestRandomizer: Randomizer |
|||
{ |
|||
// Members
|
|||
public bool booleanMember = false; |
|||
public int intMember = 4; |
|||
public uint uintMember = 2; |
|||
public float floatMember = 5; |
|||
public Vector2 vector2Member = new Vector2(4, 7); |
|||
public MemberData unsupportedMember = new MemberData(); |
|||
// Parameters
|
|||
public BooleanParameter booleanParam = new BooleanParameter() |
|||
{ |
|||
value = new ConstantSampler(1) |
|||
}; |
|||
public FloatParameter floatParam = new FloatParameter() |
|||
{ |
|||
value = new AnimationCurveSampler() |
|||
}; |
|||
public IntegerParameter integerParam = new IntegerParameter() |
|||
{ |
|||
value = new UniformSampler(-3, 7) |
|||
}; |
|||
public Vector2Parameter vector2Param = new Vector2Parameter() |
|||
{ |
|||
x = new ConstantSampler(2), |
|||
y = new UniformSampler(-4, 8) |
|||
}; |
|||
public Vector3Parameter vector3Param = new Vector3Parameter() |
|||
{ |
|||
x = new NormalSampler(-5, 9, 4, 2), |
|||
y = new ConstantSampler(3), |
|||
z = new AnimationCurveSampler() |
|||
}; |
|||
public Vector4Parameter vector4Param = new Vector4Parameter() |
|||
{ |
|||
x = new NormalSampler(-5, 9, 4, 2), |
|||
y = new ConstantSampler(3), |
|||
z = new AnimationCurveSampler(), |
|||
w = new UniformSampler(-12, 42) |
|||
}; |
|||
public ColorRgbCategoricalParameter colorRgbCategoricalParam = new ColorRgbCategoricalParameter(); |
|||
}; |
|||
} |
|
|||
fileFormatVersion: 2 |
|||
guid: 03efc69674f647478374cd5d8f746529 |
|||
timeCreated: 1632447484 |
|
|||
fileFormatVersion: 2 |
|||
guid: 98cfbce5bd48d9d4d99e5c8b8a1ee97b |
|||
folderAsset: yes |
|||
DefaultImporter: |
|||
externalObjects: {} |
|||
userData: |
|||
assetBundleName: |
|||
assetBundleVariant: |
|
|||
{"name":"AllMembersAndParametersTestRandomizer","members":[{"name":"booleanMember","value":"False","type":"System.Boolean"},{"name":"intMember","value":"4","type":"System.Int32"},{"name":"uintMember","value":"2","type":"System.UInt32"},{"name":"floatMember","value":"5","type":"System.Single"},{"name":"vector2Member","value":"(4.0, 7.0)","type":"UnityEngine.Vector2"},{"name":"unsupportedMember","value":"UnityEngine.Perception.PerceptionEngineAnalytics+MemberData","type":"UnityEngine.Perception.PerceptionEngineAnalytics+MemberData"}],"parameters":[{"name":"booleanParam","type":"BooleanParameter","fields":[{"name":"value","distribution":"Constant","value":1.0,"rangeMinimum":-2.14748365E+09,"rangeMaximum":-2.14748365E+09,"mean":-2.14748365E+09,"stdDev":-2.14748365E+09,"categoricalParameterCount":-2147483648}]},{"name":"floatParam","type":"FloatParameter","fields":[{"name":"value","distribution":"AnimationCurve","value":-2.14748365E+09,"rangeMinimum":-2.14748365E+09,"rangeMaximum":-2.14748365E+09,"mean":-2.14748365E+09,"stdDev":-2.14748365E+09,"categoricalParameterCount":-2147483648}]},{"name":"integerParam","type":"IntegerParameter","fields":[{"name":"value","distribution":"Uniform","value":-2.14748365E+09,"rangeMinimum":-3.0,"rangeMaximum":7.0,"mean":-2.14748365E+09,"stdDev":-2.14748365E+09,"categoricalParameterCount":-2147483648}]},{"name":"vector2Param","type":"Vector2Parameter","fields":[{"name":"x","distribution":"Constant","value":2.0,"rangeMinimum":-2.14748365E+09,"rangeMaximum":-2.14748365E+09,"mean":-2.14748365E+09,"stdDev":-2.14748365E+09,"categoricalParameterCount":-2147483648},{"name":"y","distribution":"Uniform","value":-2.14748365E+09,"rangeMinimum":-4.0,"rangeMaximum":8.0,"mean":-2.14748365E+09,"stdDev":-2.14748365E+09,"categoricalParameterCount":-2147483648}]},{"name":"vector3Param","type":"Vector3Parameter","fields":[{"name":"x","distribution":"Normal","value":-2.14748365E+09,"rangeMinimum":-5.0,"rangeMaximum":9.0,"mean":4.0,"stdDev":2.0,"categoricalParameterCount":-2147483648},{"name":"y","distribution":"Constant","value":3.0,"rangeMinimum":-2.14748365E+09,"rangeMaximum":-2.14748365E+09,"mean":-2.14748365E+09,"stdDev":-2.14748365E+09,"categoricalParameterCount":-2147483648},{"name":"z","distribution":"AnimationCurve","value":-2.14748365E+09,"rangeMinimum":-2.14748365E+09,"rangeMaximum":-2.14748365E+09,"mean":-2.14748365E+09,"stdDev":-2.14748365E+09,"categoricalParameterCount":-2147483648}]},{"name":"vector4Param","type":"Vector4Parameter","fields":[{"name":"x","distribution":"Normal","value":-2.14748365E+09,"rangeMinimum":-5.0,"rangeMaximum":9.0,"mean":4.0,"stdDev":2.0,"categoricalParameterCount":-2147483648},{"name":"y","distribution":"Constant","value":3.0,"rangeMinimum":-2.14748365E+09,"rangeMaximum":-2.14748365E+09,"mean":-2.14748365E+09,"stdDev":-2.14748365E+09,"categoricalParameterCount":-2147483648},{"name":"z","distribution":"AnimationCurve","value":-2.14748365E+09,"rangeMinimum":-2.14748365E+09,"rangeMaximum":-2.14748365E+09,"mean":-2.14748365E+09,"stdDev":-2.14748365E+09,"categoricalParameterCount":-2147483648},{"name":"w","distribution":"Uniform","value":-2.14748365E+09,"rangeMinimum":-12.0,"rangeMaximum":42.0,"mean":-2.14748365E+09,"stdDev":-2.14748365E+09,"categoricalParameterCount":-2147483648}]},{"name":"colorRgbCategoricalParam","type":"ColorRgbCategoricalParameter","fields":[{"name":"values","distribution":"Categorical","value":-2.14748365E+09,"rangeMinimum":-2.14748365E+09,"rangeMaximum":-2.14748365E+09,"mean":-2.14748365E+09,"stdDev":-2.14748365E+09,"categoricalParameterCount":3}]}]} |
撰写
预览
正在加载...
取消
保存
Reference in new issue