Skip to content

Commit

Permalink
Fix a typo in readme.
Browse files Browse the repository at this point in the history
Move player select UI 5 units forward to prevent z-fighting.
Enhance material property resolver on add new video screen target.
  • Loading branch information
JLChnToZ committed May 12, 2024
1 parent 971c75b commit 7f84005
Show file tree
Hide file tree
Showing 5 changed files with 64 additions and 20 deletions.
12 changes: 8 additions & 4 deletions Packages/idv.jlchntoz.vvmw/Editor/Common/Utils.cs
Original file line number Diff line number Diff line change
Expand Up @@ -143,16 +143,20 @@ static void SetValue(object entry) {
}

public static string FindMainTexturePropertyName(Material material) {
string fallback = null;
if (material != null) {
var shader = material.shader;
if (shader == null) return "";
int count = shader.GetPropertyCount();
for (int i = 0; i < count; i++)
if (shader.GetPropertyType(i) == ShaderPropertyType.Texture &&
shader.GetPropertyFlags(i).HasFlag(ShaderPropertyFlags.MainTexture))
return shader.GetPropertyName(i);
if (shader.GetPropertyType(i) == ShaderPropertyType.Texture) {
if (shader.GetPropertyFlags(i).HasFlag(ShaderPropertyFlags.MainTexture))
return shader.GetPropertyName(i);
if (fallback == null)
fallback = shader.GetPropertyName(i);
}
}
return "_MainTex";
return fallback ?? "_MainTex";
}

#if !NETSTANDARD2_1
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -471,7 +471,7 @@ RectTransform:
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1243247733899483628}
m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalPosition: {x: 0, y: 0, z: -5}
m_LocalScale: {x: 1, y: 1, z: 1}
m_ConstrainProportionsScale: 0
m_Children:
Expand Down Expand Up @@ -516,6 +516,7 @@ MonoBehaviour:
m_Script: {fileID: -1533785930, guid: 661092b4961be7145bfbe56e1e62337b, type: 3}
m_Name:
m_EditorClassIdentifier:
AllowFocusView: 1
--- !u!114 &9133502121784930954
MonoBehaviour:
m_ObjectHideFlags: 0
Expand Down Expand Up @@ -3055,6 +3056,7 @@ MonoBehaviour:
m_Script: {fileID: -1533785930, guid: 661092b4961be7145bfbe56e1e62337b, type: 3}
m_Name:
m_EditorClassIdentifier:
AllowFocusView: 1
--- !u!65 &6165191218853122116
BoxCollider:
m_ObjectHideFlags: 0
Expand Down Expand Up @@ -5257,6 +5259,11 @@ PrefabInstance:
propertyPath: m_IsActive
value: 0
objectReference: {fileID: 0}
- target: {fileID: 1053562278243965999, guid: 9b28e1c622b69d54f8e5de0ba8ea3690,
type: 3}
propertyPath: m_PresetInfoIsWorld
value: 1
objectReference: {fileID: 0}
- target: {fileID: 1138224259831982718, guid: 9b28e1c622b69d54f8e5de0ba8ea3690,
type: 3}
propertyPath: m_AnchorMax.y
Expand Down
50 changes: 41 additions & 9 deletions Packages/idv.jlchntoz.vvmw/Prefabs/Default UI.prefab
Original file line number Diff line number Diff line change
Expand Up @@ -785,7 +785,7 @@ RectTransform:
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1700802910091646479}
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalPosition: {x: 0, y: 0, z: -5}
m_LocalScale: {x: 1, y: 1, z: 1}
m_ConstrainProportionsScale: 0
m_Children:
Expand Down Expand Up @@ -830,6 +830,7 @@ MonoBehaviour:
m_Script: {fileID: -1533785930, guid: 661092b4961be7145bfbe56e1e62337b, type: 3}
m_Name:
m_EditorClassIdentifier:
AllowFocusView: 1
--- !u!1 &1808595883293603535
GameObject:
m_ObjectHideFlags: 0
Expand Down Expand Up @@ -2942,6 +2943,7 @@ MonoBehaviour:
m_Script: {fileID: -1533785930, guid: 661092b4961be7145bfbe56e1e62337b, type: 3}
m_Name:
m_EditorClassIdentifier:
AllowFocusView: 1
--- !u!65 &6165191218853122116
BoxCollider:
m_ObjectHideFlags: 0
Expand Down Expand Up @@ -5683,6 +5685,36 @@ PrefabInstance:
propertyPath: m_Name
value: Layout
objectReference: {fileID: 0}
- target: {fileID: 687935141184868603, guid: bd2ec73dfe9d6ef4e8b222c1a4fe9cee,
type: 3}
propertyPath: m_AnchorMax.y
value: 1
objectReference: {fileID: 0}
- target: {fileID: 687935141184868603, guid: bd2ec73dfe9d6ef4e8b222c1a4fe9cee,
type: 3}
propertyPath: m_AnchorMin.y
value: 1
objectReference: {fileID: 0}
- target: {fileID: 687935141184868603, guid: bd2ec73dfe9d6ef4e8b222c1a4fe9cee,
type: 3}
propertyPath: m_SizeDelta.x
value: 143.75
objectReference: {fileID: 0}
- target: {fileID: 687935141184868603, guid: bd2ec73dfe9d6ef4e8b222c1a4fe9cee,
type: 3}
propertyPath: m_SizeDelta.y
value: 17.75
objectReference: {fileID: 0}
- target: {fileID: 687935141184868603, guid: bd2ec73dfe9d6ef4e8b222c1a4fe9cee,
type: 3}
propertyPath: m_AnchoredPosition.x
value: 81.875
objectReference: {fileID: 0}
- target: {fileID: 687935141184868603, guid: bd2ec73dfe9d6ef4e8b222c1a4fe9cee,
type: 3}
propertyPath: m_AnchoredPosition.y
value: -138.875
objectReference: {fileID: 0}
- target: {fileID: 2744575312983409238, guid: bd2ec73dfe9d6ef4e8b222c1a4fe9cee,
type: 3}
propertyPath: m_AnchorMax.y
Expand All @@ -5696,7 +5728,7 @@ PrefabInstance:
- target: {fileID: 2744575312983409238, guid: bd2ec73dfe9d6ef4e8b222c1a4fe9cee,
type: 3}
propertyPath: m_SizeDelta.x
value: 89.5
value: 93.75
objectReference: {fileID: 0}
- target: {fileID: 2744575312983409238, guid: bd2ec73dfe9d6ef4e8b222c1a4fe9cee,
type: 3}
Expand All @@ -5706,7 +5738,7 @@ PrefabInstance:
- target: {fileID: 2744575312983409238, guid: bd2ec73dfe9d6ef4e8b222c1a4fe9cee,
type: 3}
propertyPath: m_AnchoredPosition.x
value: 69.75
value: 71.875
objectReference: {fileID: 0}
- target: {fileID: 2744575312983409238, guid: bd2ec73dfe9d6ef4e8b222c1a4fe9cee,
type: 3}
Expand All @@ -5726,7 +5758,7 @@ PrefabInstance:
- target: {fileID: 3724798085727359782, guid: bd2ec73dfe9d6ef4e8b222c1a4fe9cee,
type: 3}
propertyPath: m_SizeDelta.x
value: 139.5
value: 143.75
objectReference: {fileID: 0}
- target: {fileID: 3724798085727359782, guid: bd2ec73dfe9d6ef4e8b222c1a4fe9cee,
type: 3}
Expand All @@ -5736,7 +5768,7 @@ PrefabInstance:
- target: {fileID: 3724798085727359782, guid: bd2ec73dfe9d6ef4e8b222c1a4fe9cee,
type: 3}
propertyPath: m_AnchoredPosition.x
value: 79.75
value: 81.875
objectReference: {fileID: 0}
- target: {fileID: 3724798085727359782, guid: bd2ec73dfe9d6ef4e8b222c1a4fe9cee,
type: 3}
Expand Down Expand Up @@ -5781,12 +5813,12 @@ PrefabInstance:
- target: {fileID: 4697929201151263650, guid: bd2ec73dfe9d6ef4e8b222c1a4fe9cee,
type: 3}
propertyPath: m_SizeDelta.x
value: 159.5
value: 163.75
objectReference: {fileID: 0}
- target: {fileID: 4697929201151263650, guid: bd2ec73dfe9d6ef4e8b222c1a4fe9cee,
type: 3}
propertyPath: m_SizeDelta.y
value: 130
value: 157.75
objectReference: {fileID: 0}
- target: {fileID: 4697929201151263650, guid: bd2ec73dfe9d6ef4e8b222c1a4fe9cee,
type: 3}
Expand Down Expand Up @@ -5867,7 +5899,7 @@ PrefabInstance:
- target: {fileID: 5788622370935596912, guid: bd2ec73dfe9d6ef4e8b222c1a4fe9cee,
type: 3}
propertyPath: m_SizeDelta.x
value: 139.5
value: 143.75
objectReference: {fileID: 0}
- target: {fileID: 5788622370935596912, guid: bd2ec73dfe9d6ef4e8b222c1a4fe9cee,
type: 3}
Expand All @@ -5877,7 +5909,7 @@ PrefabInstance:
- target: {fileID: 5788622370935596912, guid: bd2ec73dfe9d6ef4e8b222c1a4fe9cee,
type: 3}
propertyPath: m_AnchoredPosition.x
value: 79.75
value: 81.875
objectReference: {fileID: 0}
- target: {fileID: 5788622370935596912, guid: bd2ec73dfe9d6ef4e8b222c1a4fe9cee,
type: 3}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -224,7 +224,7 @@ Canvas:
m_AdditionalShaderChannelsFlag: 0
m_UpdateRectTransformForStandalone: 0
m_SortingLayerID: 0
m_SortingOrder: 0
m_SortingOrder: -1
m_TargetDisplay: 0
--- !u!114 &1053562278243965999
MonoBehaviour:
Expand All @@ -248,7 +248,7 @@ MonoBehaviour:
m_FallbackScreenDPI: 96
m_DefaultSpriteDPI: 96
m_DynamicPixelsPerUnit: 4
m_PresetInfoIsWorld: 0
m_PresetInfoIsWorld: 1
--- !u!114 &1053562278243965984
MonoBehaviour:
m_ObjectHideFlags: 0
Expand Down
9 changes: 5 additions & 4 deletions Packages/idv.jlchntoz.vvmw/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,8 @@ Alternatively, the playlist attached on separated controls can be moved or disab
You may just right-click on the player object in hierarchy, and select `VizVid > Additional Controls > Screen`.
![ ](.tutorial/add-controls-simple.png)

- Extra: If your screen has special configuration such as using a custom shader, you may need to change the values in the inspector. If you are adopting shaders that designed to work with [iwaSync3](https://hoshinolabs.booth.pm/items/2666275), you could leave it as-is, VizVid defaults to a configuration which compatible with those shaders.
> [!NOTE]
> Extra: If your screen has special configuration such as using a custom shader, you may need to change the values in the inspector. If you are adopting shaders that designed to work with [iwaSync3](https://hoshinolabs.booth.pm/items/2666275), you could leave it as-is, VizVid defaults to a configuration which compatible with those shaders.
![ ](.tutorial/add-screen-3.png)

Expand Down Expand Up @@ -286,11 +287,11 @@ VizVid built-in supports integration with Udon Auth, the later one is a paid ass
![ ](.tutorial/udonauth-2.png)

1. Assume you have set up Udon Auth in your scene, select the lock panel, click + button at custom callbacks field.
2. Find the "Player List Queue Handler" inside the player, drag it to custom callbacks field.
3. Select "Player List Queue Handler"
2. Find the "Playlist Queue Handler" inside the player, drag it to custom callbacks field.
3. Select "Playlist Queue Handler"
4. Enable "Lock" option.

In the other hand, you can program your own locks instead of using my paid asset, just send the `_OnUnlock` custom event to the Udon attached on Player List Queue Handler, and it will become unlocked.
In the other hand, you can program your own locks instead of using my paid asset, just send the `_OnUnlock` custom event to the Udon attached on Playlist Queue Handler, and it will become unlocked.

### Audio Link
This player provides basic integration to Audio Link, basic setup please refer to the "Audio Link" option above.
Expand Down

0 comments on commit 7f84005

Please sign in to comment.