setchi / fancyscrollview Goto Github PK
View Code? Open in Web Editor NEW[Unity] Scroll view component that can implement highly flexible animations.
Home Page: https://setchi.jp/FancyScrollView/
License: MIT License
[Unity] Scroll view component that can implement highly flexible animations.
Home Page: https://setchi.jp/FancyScrollView/
License: MIT License
Hi Sir,
Is it possible to assign images to those white and blue cells. I tried to change them to image but i failed to get results.
please help me
thank you
We're referencing FancyScrollView from Unity's package manager instead of importing it into the Assets folder (i.e. the new recommended way).
Now we want to add Unit Tests to our project, which requires us to setup assembly definitions for our code. Which in turn requires us to reference any third party library in our .asmdef file.
However, this is only possible if the library itself contains an .asmdef file. We can add these for libraries in the Assets folder, but not for libraries in the package manager.
So I wanted to kindly ask you to provide an .asmdef file as part of the default library. Thanks.
uGUIで使っております。
要素が重なるように配置すると、オブジェクトの使い回しをする箇所でオーダーが崩れます。
ヒエラルキー上の順番をID順に揃える方法はありませんでしょうか?
Considering Example 7 Scroll Rect, the PaddingTop property doesn't work as intended when the scrollview is initialized at the start if we set the start index as 0.
It only works if we start scrolling the scrollview or if we set the start index as something other than 0.
Thanks for this wonderful plugin.
Even though most of the time Vertical Scroll Rect is scroll from top to bottom, but there are also cases that require to scroll from bottom to top
Is it possible to creat a n columns m row scroll view
You're doing a great job with the project and thanks for sharing it with the community but constant releases with zero info about new features and/or bug fixes are kinda annoying.
Commit messages are not meant to be used as "changelog points" since their titles are not self-explanatory for a random consumer.
I wanted to add my own button from scrollrect.
I create arry to contain those object.
try to use that arry instead of cell but get confused with too many changes.
in the end, can't use the script for buttons.
can anyone help me with this?
I want to use fancy scroll view in my project. for scrollrect.
I want to stop scroll if the first item on top or the last item on bottom?
My ScrollView is full screen, and the Cell is just Text Prefab, I don't add any animation.
Hello, I have tried changing the anchor preset to make the cell auto resize on many different screen sizes, but it seems in the animation also change it. I see the anchor change on the inspector. So how does the cell size fit on multi screen? Thanks
お疲れ様です、エンジニアの楊と申します。
今担当している案件ではFancyScrollViewライブラリは使われています、とても優秀なライブラリと思いました、ありがとうございました。
開発中で一点気になったことがあります。スクロールビューの中セル数が多い場合(スクロールバーが表示される)padding headは効いてますけど、セル数が少ない場合(スクロールバーが表示されない)padding head設定は効かない、一番目のセルとTopの距離は固定されています。
ソースコードを拝見しまして、FancyScrollRect.cs#L108のところ、base.UpdatePosition(Scrollable ? ToFancyScrollViewPosition(p) : 0f);
処理は分岐されています。ここは何か意図はございますか?スクロールできるできないににかかわらず、同じpadding headにしたい場合は如何設定すれば良いでしょうか?
お手数ですが、ご確認のほど宜しくお願い致します。
Git tag: v1.8.8
package.json version: 1.8.7
To fix:
v1.8.8
Hi,
I see you posted this in your description : https://github.com/setchi/FancyScrollView/blob/master/Documents/screencast2.gif
But the seem that it's not attached in the examples. Could you please share it?
BTW, I have a question: You are using the animator (animation) for your scrollview. Could you please help me support step by step to modify animation or something like that to custom animation for scrollview. I tried to custom but it's hard to handle it.
Thank so much for your scrollview. It's a awesome scrollview.
Is there any special reason for instantiating cells from cellBase
which is set to inactive in FancyScrollView
's Awake
? I was thinking that support of instantiating from prefab can be useful, plus it would allow not having disabled cellBase
object in heirarchy.
Hi, I very like the FancyScrollView
But I am facing some issues with resetting the scroller and its content.
For example, I want the Scroller and its contents to be reset whenever I press a button or hit something. By default, if I destroy the object inside the content, Unity will flag an error saying FancyScrollView is looking for objects that have been destroyed and stop the play.
If I replace the object inside the content, the position of the viewport will not change.
Is that any efficient way to reset the FancyScrollView?
Thanks,
Hello,
My scrollview holds levels for a given world of the game.
When I select a new world I would like to repopulate the scrollview with the new world levels.
I created this method
public void UpdateCellData()
{
var cellData = WorldManager.Instance.Levels
.Select(kvp => new WorldLevelCellData()
{
LevelNumber = kvp.Key,
LevelData = kvp.Value,
Active = kvp.Value.Active || kvp.Key == 0
})
.ToList();
scrollView.UpdateData(cellData);
}
that is called when I select a level.
This does not immediately update the scrollview, but I have to scroll through the levels to see the cells update.
Any fix for this?
Hello,
I am working on this game : https://play.google.com/store/apps/details?id=com.Meludia.MicroMelody and used FancyScrollView to display game levels.
I have a scene for selecting game worlds then a scene for displaying levels from the selected world.
The levels scene must scroll the last played level. But when it scrolls it has strange behaviours, please see attached images and video.
https://www.dropbox.com/s/s622j1wp5dzjvu5/Meludia_2017-10-30-09-37-40.mp4?dl=0
As the title, tried to modify the source code by myself but seem to be incorrect. I want to ask a way to support snap for ScrollRect component,or the author did not add this feature because it's necessary?
Hello,
How to get the index of the snapped cell?
Thanks
Is there a way you could make this support a Grid Layout Group?
I know that's the main point of the program, but there are times where i need an individual cell to have it's own information. Is it possible?
Hi, first, great work, thank you ;)
But I find a bug I think.
It works fine in the editor but when I built it on my iPad, the cells are not shown on the screen like the picture I attached, it just shows the background. They will show correctly after you touch and slide.
How to reproduce:
Environment:
Unity 2017.3.1f1
iPad Air 2
iOS 11.1.1
Does it also apply to display 3D Models .
Hi Sorry for the English comment.
Would you be ok with this excellent control being added to the Unity UI Extensions project?
https://bitbucket.org/UnityUIExtensions/unity-ui-extensions
The following warning is reported by Unity on the Shader used in the Veroni example
As follows
Shader warning in 'FancyScrollViewGallery/Voronoi': 'i': loop control variable conflicts with a previous declaration in the outer scope; most recent declaration will be used at Assets/unity-ui-extensions/Examples/FancyScrollView/Sources/05_Voronoi/Voronoi.hlsl(66) (on d3d11)
Compiling Vertex program
Platform defines: UNITY_ENABLE_REFLECTION_BUFFERS UNITY_USE_DITHER_MASK_FOR_ALPHABLENDED_SHADOWS UNITY_PBS_USE_BRDF1 UNITY_SPECCUBE_BOX_PROJECTION UNITY_SPECCUBE_BLENDING UNITY_ENABLE_DETAIL_NORMALMAP SHADER_API_DESKTOP UNITY_COLORSPACE_GAMMA UNITY_LIGHT_PROBE_PROXY_VOLUME UNITY_LIGHTMAP_FULL_HDR
It seems to dislike the Index "i" being used in both unroll loops.
Simple fix for the second unroll seems to be to change it to another name, e.g. "j"
Hi there
Not sure if it is my own implementation but it looks like there is a problem with your suggested simple example.
This is the error:
NullReferenceException: Object reference not set to an instance of an object
FancyScrollView.FancyScrollView2[TData,TContext].CreateCell () (at Assets/FancyScrollView/Scripts/FancyScrollView.cs:50) FancyScrollView.FancyScrollView
2[TData,TContext].UpdatePosition (Single position) (at Assets/FancyScrollView/Scripts/FancyScrollView.cs:166)
FancyScrollView.FancyScrollView`2[TData,TContext].LateUpdate () (at Assets/FancyScrollView/Scripts/FancyScrollView.cs:90)
My scroll view cell looks like this:
`using UnityEngine;
using UnityEngine.UI;
using FancyScrollView;
public class MYOM_ScrollViewCell : FancyScrollViewCell<MYOM_CellData>
{
[SerializeField]
Text message;
public override void UpdateContent(MYOM_CellData itemData)
{
message.text = itemData._message;
}
public override void UpdatePosition(float position)
{
// position is a value between 0.0 and 1.0
// You can control the appearance of the cell freely based on position
}
}`
so it looks like it is having a type mismatch in line 48 of FancyScrollView.cs var cell = cellObject.GetComponent<FancyScrollViewCell<TData, TContext>>();
with the following line 50 var cellRectTransform = cell.transform as RectTransform;
In Unity this problem clones non-stop 'Cells' and not inside a parent object.
Any ideas?
Thanks
hi i tried to change UpdateContent function inside FancyScrollviewCell.cs file as below:
public virtual IEnumerator UpdateContent(TData itemData) { return new object[0].GetEnumerator(); }
and changed UpdateContent function inside Example02ScrollViewCell.cs as below:
public override IEnumerator UpdateContent(Example02CellDto itemData) { message.text = itemData.Message; WWW www = new WWW(itemData.url); yield return www; if (context != null) { var isSelected = context.SelectedIndex == DataIndex;
image.sprite = Sprite.Create(www.texture, new Rect(0, 0, www.texture.width, www.texture.height), new Vector2(0, 0));; /*image.color = isSelected ? new Color32 (0, 255, 255, 100) : new Color32 (255, 255, 255, 77);*/ } yield return new object[0].GetEnumerator(); }
I have also changed my data model to be as below in Example02CellDto.cs:
namespace UnityEngine.UI.Extensions.Examples { public class Example02CellDto { public string Message; public string url; } }
the odd thing is the UpdateContent in Example02ScrollViewCell.cs does not get called.
what is really wrong with this approach and what is the right one?
您好,请问
滑动实时选中如何实现
This Components is so Cool! amazing!
var p = position - scrollOffset / cellInterval;
var firstIndex = Mathf.CeilToInt(p);
var firstPosition = (Mathf.Ceil(p) - p);// * cellInterval;
Hi @setchi I'm new learning your code, I have problem to understand above caculation, why this can get first index and position?
Hi,
As the title. How to use the middle mouse to scroll?
Thanks.
Hi @setchi,
Thanks for creating the awesome upm package. I noticed that you contribute the package to OpenUPM list, but it's fail on the build pipeline.
The reason is that the build pipelines will checkout each valid semver git tags, and build package from there. For this project, only the upm branch contains the package.json and other necessary upm files (licenses...). As a result, the package can be only installed via git url.
Here's the suggestion to fix the issue with better folder strucutre (also make it more consistent between different branches).
Assets/FancyScrollView/
Assets/FancyScrollView/
to Packages/jp.setchi.fancyscrollview
to it a local package. So you always test your library as a package in the unity project.Samples~
and update the package.json. see https://forum.unity.com/threads/samples-in-packages-manual-setup.623080/, it will be shown in the package manager ui window.Here's the steps for further releases
(openupm will detect the changes, and publish new version).
Hope this help.
Hi,
Can you add the feature scroll for each page.?
Thanks.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.